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

js-key

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

js-key

Javascript key set and get for nested objects

latest
Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
5
150%
Maintainers
1
Weekly downloads
 
Created
Source

js-key

POJO selectors and modifiers

installation: npm install --save js-key

usage:

  import {get, set} from 'js-key'
  const deepObj = {
    test: {
      arr: [
        0, 1, 2, {
          obj: {
            t: 'success'
          }
        }
      ]
    }
  }
  get(deepObj, 'test.arr.3.obj.t') // 'success'
  set(deepObj, 'test.arr.3.obj.t', 'happy day') // returns deepObj
  get(deepObj, 'test.arr.3.obj.t') // 'happy day'

Keywords

POJO

FAQs

Package last updated on 14 Dec 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