1.0.0 • Published 9 years ago

ponyfill-array-reduce v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

ponyfill-array-reduce

Build Status

ES6 Array.reduce() ponyfill

Ponyfill: A polyfill that doesn't overwrite the native method

Install

$ npm install ponyfill-array-reduce --save

Usage

var reduce = require('ponyfill-array-reduce');
[4, 6, 7, 12].reduce(function(a, b) {
  return a + b;
});
//=> 29
var reduce = require('ponyfill-array-reduce');
[[4, 6], [7, 12]].reduce(function(a, b) {
  return a.concat(b);
});
//=> [4, 6, 7, 12]

License

MIT © Colin Milhench