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.
 
 
 
 
 
xuma 061bf09bc8 one key push update 2 years ago
..
test one key push update 2 years ago
.editorconfig one key push update 2 years ago
.eslintrc one key push update 2 years ago
.travis.yml one key push update 2 years ago
LICENCE one key push update 2 years ago
README.md one key push update 2 years ago
index.js one key push update 2 years ago
package.json one key push update 2 years ago

README.md

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