Have ideas to improve npm?Join in the discussion! »

reject

0.0.1 • Public • Published

reject

Simple reject utility, works on objects and arrays.

$ npm install reject

Example

// arrays
 
reject([1, null]); // => [1]
reject([1, null], parseInt) // => [null]
reject.types([1, null], 'null') // => [1]
reject.types([1, null, undefined], ['undefined', 'null']) // => [1]
 
// objects
 
reject({ one: 1, two: null }) // => { one: 1 }
reject({ one: 1, two: null }, parseInt) // => { two: null }
reject.types({ one: 1, two: null }, ['null']) // => { one: 1 }

License

(MIT)

Keywords

none

Install

npm i reject

DownloadsWeekly Downloads

1,878

Version

0.0.1

License

none

Last publish

Collaborators

  • avatar