remove null/undefined values recursively from objects
Installation
$ npm install --save object-compact
Usage
const objectCompact = require('object-compact');
objectCompact({
bar: 'Hello',
baz: null,
foo: {
bar: 'World !',
baz: null
}
});
/*
=>
{
bar: 'Hello',
foo: {
bar: 'World !'
}
}
*/
License
MIT © Gabriel