{"name":"reduce-object","description":"Reduces an object to a value that is the accumulated result of running each property in the object through a callback. Executes the callback function once for each own enumerable property in the object, receiving four arguments: the initial value (or valu","version":"0.1.2","homepage":"https://github.com/jonschlinkert/reduce-object","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/reduce-object.git"},"bugs":{"url":"https://github.com/jonschlinkert/reduce-object/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/reduce-object/blob/master/LICENSE-MIT"}],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"mocha":"*","should":"^4.0.4"},"keywords":["accumulate","accumulator","callback","cb","find","for-in","for-own","has","has-own","hasOwn","index","iterate","iterator","javascript","js","key","keys","loop","node.js","object","own","prop","properties","property","reduce","util","utilities","utility","utils","value"],"dependencies":{"for-own":"^0.1.1"},"_id":"reduce-object@0.1.2","_shasum":"623d32530c8b30113a72aac564b12221cd118908","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"623d32530c8b30113a72aac564b12221cd118908","tarball":"http://registry-npm.ywwl.com/reduce-object/download/reduce-object-0.1.2.tgz","integrity":"sha512-bIXVQg1QM4KAmy0ph8BtN/vofUlQsK0EJGAo3Y8uwNCRRw0/9CFjgl++TEBrbJArKFZHEVHk/oguRiG1JsMNrw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCP6c86faEin8f1CXJXsrHO0qfIhGEWHCuj6ezxiwdtjwIgXDqfO1guSpD7YYxP3iPW+RhwVTb9HCz94rR5E0h19/M="}],"size":2984,"noattachment":false,"key":"/reduce-object/-/reduce-object-0.1.2.tgz"},"directories":{},"readme":"# reduce-object [![NPM version](https://badge.fury.io/js/reduce-object.svg)](http://badge.fury.io/js/reduce-object)\n\n> Reduces an object to a value that is the accumulated result of running each property in the object through a callback.\n\n## Install\n#### Install with [npm](npmjs.org):\n\n```bash\nnpm i reduce-object --save\n```\n\n## Run tests\n\n```bash\nnpm test\n```\n\n## Usage\n\nExecutes the callback function once for each own enumerable property in the object, receiving four arguments:\n\n  - `acc`: the initial value (or value from the previous callback call),\n  - `value`: the of the current property,\n  - `key`: the of the current property, and\n  - the original `object` over which the function is iterating.\n\n```js\nvar reduce = require('reduce-object');\n\nvar a = {a: 'foo', b: 'bar', c: {}};\n\nvar obj = reduce(a, function (acc, value, key, orig) {\n  if (typeof value === 'object') {\n    acc[key] = {what: 'huh?'};\n  } else {\n    acc[key] = value.toUpperCase(); // why?\n  }\n  return acc;\n}, {});\n\nconsole.log(obj);\n//=> {a: 'FOO', b: 'BAR', c: {what: 'huh?'}};\n```\n\n## Author\n\n**Jon Schlinkert**\n\n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\nCopyright (c) 2014 Jon Schlinkert, contributors.\nReleased under the MIT license\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 20, 2014._","publish_time":1411257886081,"_cnpm_publish_time":1411257886081,"dist-tags":{"latest":"0.1.3"}}