sahmat

1.0.1 • Public • Published

sahmat

Build Status

simple getter and setter for deep objects

Installation

npm i -S sahmat

Usage

 
const sahmat = require('sahmat')
 
const obj = {
  one: {
    two: {
      a: 1,
      b: [3,4,5]
    }
  }
}
 
// GET
 
sahmat(obj, 'one.two.a')
// 1
 
sahmat(obj, 'one.two.b.2')
// 5
 
// SET
 
sahmat(obj, 'one', {})
 
sahmat(obj, 'one')
 
// {}
 

License

MIT

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i sahmat

    Weekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    101 kB

    Total Files

    6

    Last publish

    Collaborators

    • cond