New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

observify-keypath

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

observify-keypath

get/set observify values using dot-notation keypaths

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

observify-keypath

get/set observify values using dot-notation keypaths

Install

npm install --save observify-keypath

Example

var keypath = require('observify-keypath');

var data = observify({
  nested: {
    obj: {
      arr: [{ cool: 'pizza' }]
    }
  }
});

// get a value
var value = keypath.get(data, 'nested.obj.arr.0.cool');

// set a value
keypath.set(data, 'nested.obj.arr.0.cool', 'awesome');

Usage

var keypath = require('observify-keypath');

Methods

keypath.get(data, keypath);

data is the observify object.

keypath is the path of keys specified using dot notation.

keypath.set(data, keypath, value);

data is that observify object.

keypath is the path of keys specified using dot notation.

value is what you will set the value to.

License

MIT

FAQs

Package last updated on 18 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts