Reduces an object to a value that is the accumulated result of running each property in the object through a callback.
Install
npm:
Install withnpm i reduce-object --save
Run tests
npm test
Usage
Executes the callback function once for each own enumerable property in the object, receiving four arguments:
acc
: the initial value (or value from the previous callback call),value
: the of the current property,key
: the of the current property, and- the original
object
over which the function is iterating.
var reduce = ; var a = a: 'foo' b: 'bar' c: {}; var obj = ; console;//=> {a: 'FOO', b: 'BAR', c: {what: 'huh?'}};
Author
Jon Schlinkert
License
Copyright (c) 2014 Jon Schlinkert, contributors. Released under the MIT license
This file was generated by verb-cli on September 20, 2014.