0.1.4 • Published 6 years ago

js-clean-obj v0.1.4

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

js-clean-obj

Build Status codecov

Remove empty and undefined attributes of object.

install

npm i -S js-clean-obj

use

const cleanobj = require('js-clean-obj');

const foo = {
  a: 1,
  b: { c: undefined },
  d: [null, { e: true }, { f: {} }]
};

cleanobj(foo);
console.log(foo);
// { a: 1, d: [ null, { e: true } ] }
0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago