REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.31 KB
Close
//opt/alt/alt-nodejs9/root/lib/node_modules/npm/node_modules/cli-table2/node_modules/lodash/math/sum.js
Text
Base64
var arraySum = require('../internal/arraySum'), baseCallback = require('../internal/baseCallback'), baseSum = require('../internal/baseSum'), isArray = require('../lang/isArray'), isIterateeCall = require('../internal/isIterateeCall'), toIterable = require('../internal/toIterable'); /** * Gets the sum of the values in `collection`. * * @static * @memberOf _ * @category Math * @param {Array|Object|string} collection The collection to iterate over. * @param {Function|Object|string} [iteratee] The function invoked per iteration. * @param {*} [thisArg] The `this` binding of `iteratee`. * @returns {number} Returns the sum. * @example * * _.sum([4, 6]); * // => 10 * * _.sum({ 'a': 4, 'b': 6 }); * // => 10 * * var objects = [ * { 'n': 4 }, * { 'n': 6 } * ]; * * _.sum(objects, function(object) { * return object.n; * }); * // => 10 * * // using the `_.property` callback shorthand * _.sum(objects, 'n'); * // => 10 */ function sum(collection, iteratee, thisArg) { if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { iteratee = undefined; } iteratee = baseCallback(iteratee, thisArg, 3); return iteratee.length == 1 ? arraySum(isArray(collection) ? collection : toIterable(collection), iteratee) : baseSum(collection, iteratee); } module.exports = sum;
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
add.js
358 B
lrw-r--r--
2021-09-28 11:28:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ceil.js
491 B
lrw-r--r--
2021-09-28 11:28:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
floor.js
505 B
lrw-r--r--
2021-09-28 11:28:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
max.js
1.80 KB
lrw-r--r--
2021-09-28 11:28:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
min.js
1.80 KB
lrw-r--r--
2021-09-28 11:28:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
round.js
485 B
lrw-r--r--
2021-09-28 11:28:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
sum.js
1.31 KB
lrw-r--r--
2021-09-28 11:28:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).