handle-obj

1.0.1 • Public • Published

handle-obj

Multi-layer object extraction as a layer.

Install

$ npm install handle-obj

or

$ yarn add handle.obj

example:

const handleObj = require('handle-obj');

const obj = {
  a: 1,
  b: 'bbb',
  c: {
    d: 2,
    e: 'eee',
    f: {
      g: [1,2,3],
      h: {
        i: 'asd',
        j: '43'
      }
    }
  },
  k: {
    l: 1,
    m: ['s','as']
  }
}
const result = handleObj(obj);
console.log(result);

output:

{ 
  a: 1,
  b: 'bbb',
  d: 2,
  e: 'eee',
  g: [ 1, 2, 3 ],
  i: 'asd',
  j: '43',
  l: 1,
  m: [ 's', 'as' ] 
}

Readme

Keywords

Package Sidebar

Install

npm i handle-obj

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

2.06 kB

Total Files

4

Last publish

Collaborators

  • silenceboy