Skip to content

tlvince/omit-falsy

Repository files navigation

omit-falsy

Build Status npm version License

Omit falsy object values

const omitFalsy = require('omit-falsy')
const obj = {
  a: 'foo',
  b: '',
  c: 0,
  d: 'bar'
}
omitFalsy(obj)
//=> {a: 'foo', d: 'bar'}

Installation

npm install --save omit-falsy

Author

© 2016 Tom Vincent git@tlvince.com (https://tlvince.com)

License

Released under the MIT license.