{"name":"collection-visit","description":"Visit a method over the items in an object, or map visit over the objects in an array.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/collection-visit","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/collection-visit.git"},"bugs":{"url":"https://github.com/jonschlinkert/collection-visit/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"map-visit":"^0.1.0","object-visit":"^0.1.0"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["array","arrays","context","function","helper","invoke","key","map","method","object","objects","value","visit","visitor"],"verbiage":{"related":{"list":["object-visit","map-visit"]}},"gitHead":"d81c5237aa8488f65cca885a32f87a3a970a4580","_id":"collection-visit@0.1.1","_shasum":"ea6f937e340748725c28107a674554df759e070c","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"ea6f937e340748725c28107a674554df759e070c","tarball":"http://registry-npm.ywwl.com/collection-visit/download/collection-visit-0.1.1.tgz","integrity":"sha512-h2wK0wOJBi6aqnvhPTfCVffjWQbqajfGxEofIsxHkrrOd3g2wEWRmB9YPJDKhAxqzQDjdOFyOs+92riYFMwKbg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAT5sZ2KdXiug2hcaZJeuuBpLLpxhMSw2+KXYapBbJzJAiEAulRrGYN9lzLJ3LBkd/hfTh910VvAK4QYBx4FD8Xt7bw="}],"size":2098,"noattachment":false,"key":"/collection-visit/-/collection-visit-0.1.1.tgz"},"directories":{},"readme":"# collection-visit [![NPM version](https://img.shields.io/npm/v/collection-visit.svg?style=flat)](https://www.npmjs.com/package/collection-visit) [![NPM monthly downloads](https://img.shields.io/npm/dm/collection-visit.svg?style=flat)](https://npmjs.org/package/collection-visit)  [![NPM total downloads](https://img.shields.io/npm/dt/collection-visit.svg?style=flat)](https://npmjs.org/package/collection-visit) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/collection-visit.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/collection-visit)\n\n> Visit a method over the items in an object, or map visit over the objects in an array.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save collection-visit\n```\n\n## Usage\n\n```js\nvar visit = require('collection-visit');\n\nvar ctx = {\n  data: {},\n  set: function (key, value) {\n    if (typeof key === 'object') {\n      visit(ctx, 'set', key);\n    } else {\n      ctx.data[key] = value;\n    }\n  }\n};\n\nctx.set('a', 'a');\nctx.set('b', 'b');\nctx.set('c', 'c');\nctx.set({d: {e: 'f'}});\n\nconsole.log(ctx.data);\n//=> {a: 'a', b: 'b', c: 'c', d: { e: 'f' }};\n```\n\n## About\n\n### Related projects\n\n* [base-methods](https://www.npmjs.com/package/base-methods): base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/jonschlinkert/base-methods) | [homepage](https://github.com/jonschlinkert/base-methods \"base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.\")\n* [map-visit](https://www.npmjs.com/package/map-visit): Map `visit` over an array of objects. | [homepage](https://github.com/jonschlinkert/map-visit \"Map `visit` over an array of objects.\")\n* [object-visit](https://www.npmjs.com/package/object-visit): Call a specified method on each value in the given object. | [homepage](https://github.com/jonschlinkert/object-visit \"Call a specified method on each value in the given object.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Contributors\n\n| **Commits** | **Contributor** | \n| --- | --- |\n| 13 | [jonschlinkert](https://github.com/jonschlinkert) |\n| 9 | [doowb](https://github.com/doowb) |\n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 09, 2017._","publish_time":1438768790927,"_cnpm_publish_time":1438768790927,"dist-tags":{"latest":"1.0.0"}}