0.0.1 • Published 8 years ago

js-key v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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'