object-compact

1.0.1 • Public • Published

object-compact NPM version Build Status Dependency Status Coverage percentage

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

Package Sidebar

Install

npm i object-compact

Weekly Downloads

4

Version

1.0.1

License

MIT

Unpacked Size

7.25 kB

Total Files

5

Last publish

Collaborators

  • gperales