fn-reduce
v0.1.0
Published
reduce function for arraylike objects
Downloads
7
Maintainers
Readme
fn-reduce
fn-reduce
provides a function that calculates reduce for array-like objects.
Install
$ npm install fn-reduce --save
Usage
const reduce = require('fn-reduce')
reduce((a, b) => a + b, 0, [2, 5, 3, 1]) // 11
reduce((a, b) => a * b, 1, [1, 2, 3, 4, 5]) // 120
Support
- Node.js >=6
- ES2015 transpilers
License
MIT