You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

592 B

reduce build status

Example

Like Array.prototype.reduce but works on Object and accepts optional this value

var reduce = require("reduce")

reduce({
    key: "value"
    , key2: "value2"
    , ...
}, function (acc, value, key) {
    /* real code */
    acc[key] = value
    return acc
}, {
    this: "context"
}, {
    initial: "value"
})

Installation

npm install reduce

Contributors

  • Raynos

MIT Licenced