sugar
Version:
A Javascript utility library for working with native objects.
17 lines (12 loc) • 487 B
JavaScript
;
var Sugar = require('sugar-core'),
arrayReduce = require('../../es5/internal/arrayReduce');
Sugar.Array.defineInstancePolyfill({
'reduceRight': function(reduceFn) {
// Force compiler to respect argument length.
var argLen = arguments.length, context = arguments[1];
return arrayReduce(this, reduceFn, context, true);
}
});
// This package does not export anything as it is mapping a
// polyfill to Array.prototype which cannot be called statically.