@branu-jp/define-nested-object

0.0.3 • Public • Published

define-nested-object

Easily created nested objects. Instead of:

const foo = {
  bar: {
    qux: {
      box: 'val'
    }
  }
}

You can write:

let foo = {}
defineNestedObject(foo, 'bar.qux.box', 'val')

Use:

import defineNestedObject from '@branu-jp/define-nested-object' 

let foo = {}
defineNestedObject(foo, 'bar.qux 'val') //=> foo = { bar: { qux: 'val } }

Readme

Keywords

Package Sidebar

Install

npm i @branu-jp/define-nested-object

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

1.42 kB

Total Files

3

Last publish

Collaborators

  • lmiller1990
  • pinball1973b
  • ykhirao