mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Remove references to _.
This commit is contained in:
5
sumBy.js
5
sumBy.js
@@ -1,12 +1,11 @@
|
||||
import baseSum from './_baseSum.js';
|
||||
|
||||
/**
|
||||
* This method is like `_.sum` except that it accepts `iteratee` which is
|
||||
* This method is like `sum` except that it accepts `iteratee` which is
|
||||
* invoked for each element in `array` to generate the value to be summed.
|
||||
* The iteratee is invoked with one argument: (value).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Math
|
||||
* @param {Array} array The array to iterate over.
|
||||
@@ -16,7 +15,7 @@ import baseSum from './_baseSum.js';
|
||||
*
|
||||
* var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
|
||||
*
|
||||
* _.sumBy(objects, function(o) { return o.n; });
|
||||
* sumBy(objects, function(o) { return o.n; });
|
||||
* // => 20
|
||||
*/
|
||||
function sumBy(array, iteratee) {
|
||||
|
||||
Reference in New Issue
Block a user