package
Visit a method over the items in an object, or map visit over the objects in an array.
npm install collection-visitGitHub-flavored package documentation.
Across all versions, last 30 days.
40,182,620 in 30 days
Runtime metadata.
Tagged topics.
Visit a method over the items in an object, or map visit over the objects in an array.
Install with npm:
$ npm install --save collection-visitvar visit = require('collection-visit');
var ctx = {
data: {},
set: function (key, value) {
if (typeof key === 'object') {
visit(ctx, 'set', key);
} else {
ctx.data[key] = value;
}
}
};
ctx.set('a', 'a');
ctx.set('b', 'b');
ctx.set('c', 'c');
visit over an array of objects. | homepagePull requests and stars are always welcome. For bugs and feature requests, please create an issue.
| Commits | Contributor |
|---|---|
| 13 | jonschlinkert |
| 9 | doowb |
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verbRunning 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:
$ npm install && npm testJon Schlinkert
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.5.0, on April 09, 2017.
Estimated unpacked size across 4 packages.
4.9 kB
Includes dependencies.
jonschlinkert
github@sellside.com
^1.0.0
1.0.1