COLLECTED BY
Organization:
Internet Archive
Focused crawls are collections of frequently-updated webcrawl data from narrow (as opposed to broad or wide) web crawls, often focused on a single domain or subdomain.
The Wayback Machine - https://web.archive.org/web/20201220222356/https://github.com/lodash/lodash/blob/master/sum.js
Permalink
Cannot retrieve contributors at this time
21 lines (19 sloc)
406 Bytes
import baseSum from './.internal/baseSum.js'
/**
* Computes the sum of the values in `array`.
*
* @since 3.4.0
* @category Math
* @param {Array } array The array to iterate over.
* @returns {number } Returns the sum.
* @example
*
* sum([4, 2, 8, 6])
* // => 20
*/
function sum ( array ) {
return ( array != null && array . length )
? baseSum ( array , ( value ) => value )
: 0
}
export default sum
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.