All Projects → jonschlinkert → object-visit

jonschlinkert / object-visit

Licence: MIT license
Call the given method on each value in the given object.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to object-visit

js-deep-sort-object
Simple module to sort objects recursively by its keys
Stars: ✭ 19 (+0%)
Mutual labels:  collection, object
Moses
Utility library for functional programming in Lua
Stars: ✭ 541 (+2747.37%)
Mutual labels:  collection, object
derivejs
DeriveJS is a reactive ODM - Object Document Mapper - framework, a "wrapper" around a database, that removes all the hassle of data-persistence by handling it transparently in the background, in a DRY manner.
Stars: ✭ 54 (+184.21%)
Mutual labels:  collection, object
Collection
Collection Data for Cooper Hewitt, Smithsonian Design Museum
Stars: ✭ 214 (+1026.32%)
Mutual labels:  collection
Small Workflows
Small Alfred workflows I use
Stars: ✭ 218 (+1047.37%)
Mutual labels:  collection
ethjs-contract
A simple contract object for the Ethereum RPC layer.
Stars: ✭ 21 (+10.53%)
Mutual labels:  object
awesome-battlesnake
A curated list of Battlesnake resources
Stars: ✭ 83 (+336.84%)
Mutual labels:  collection
Awesome Prometheus Alerts
🚨 Collection of Prometheus alerting rules
Stars: ✭ 3,323 (+17389.47%)
Mutual labels:  collection
rrbit
An Immutable vectors/lists/arrays library using the Relaxed Radix Balancing(RRB) technique
Stars: ✭ 12 (-36.84%)
Mutual labels:  collection
BAT FFMPEG
Batch script files for FFMPEG (Microsoft Windows and DOS, OS/2 🦄)
Stars: ✭ 104 (+447.37%)
Mutual labels:  collection
liu
💫 Boshiamy Input Method in macOS 嘸蝦米輸入法
Stars: ✭ 39 (+105.26%)
Mutual labels:  method
itlib
A collection of std-like single-header C++ libraries
Stars: ✭ 101 (+431.58%)
Mutual labels:  collection
Resources
📖 Huge curated collection (archive) of links of Tech, Science, Economics, Politics, Life, Philosophy, Conferences, Videos and much more resources from everyday surfing. ⭐️ Since October 21, 2017.
Stars: ✭ 236 (+1142.11%)
Mutual labels:  collection
WormHole
WormHole allows to share classes between Flutter and Native Platform (android / ios)
Stars: ✭ 36 (+89.47%)
Mutual labels:  method
Threat Hunting
Personal compilation of APT malware from whitepaper releases, documents and own research
Stars: ✭ 219 (+1052.63%)
Mutual labels:  collection
fe-store-house
The front-end resource that gathered in my working days.
Stars: ✭ 95 (+400%)
Mutual labels:  collection
Colllect
Your visual bookmark manager
Stars: ✭ 216 (+1036.84%)
Mutual labels:  collection
stringify-keys
Build an array of key paths from an object.
Stars: ✭ 18 (-5.26%)
Mutual labels:  object
http-method
🍇 Provides constants for HTTP request methods.
Stars: ✭ 83 (+336.84%)
Mutual labels:  method
cga-collection
Collection of cga repositories and CityEngine publications
Stars: ✭ 20 (+5.26%)
Mutual labels:  collection

object-visit NPM version NPM monthly downloads NPM total downloads Linux Build Status

Call a specified method on each value in the given object.

Install

Install with npm:

$ npm install --save object-visit

Usage

var visit = require('object-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');
ctx.set({d: {e: 'f'}});

console.log(ctx.data);
//=> {a: 'a', b: 'b', c: 'c', d: { e: 'f' }};

About

Related projects

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

(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 && verb

Running tests

Running 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 test

Author

Jon Schlinkert

License

Copyright © 2017, Jon Schlinkert. Released under the MIT License.


This file was generated by verb-generate-readme, v0.5.0, on April 09, 2017.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].