core-js
Version:
Standard library
13 lines (10 loc) • 490 B
JavaScript
;
var internalReduce = require('../internals/array-reduce');
var SLOPPY_METHOD = require('../internals/sloppy-array-method')('reduce');
// `Array.prototype.reduce` method
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
require('../internals/export')({ target: 'Array', proto: true, forced: SLOPPY_METHOD }, {
reduce: function reduce(callbackfn /* , initialValue */) {
return internalReduce(this, callbackfn, arguments.length, arguments[1], false);
}
});