object.filter
Create a new object filtered to have only properties for which the callback returns true.
Install
Install with npm:
npm i object.filter --save-dev
Run tests
npm test
Usage
var filter = require('object.filter');
filter({a: 'a', b: 'b', c: 'c'}, function (value, key, obj) {
return key !== 'b';
});
filter({a: 'a', b: 'b', c: 'c'}, function (value, key, obj) {
return key === 'b';
});
Related projects I maintain
Author
Jon Schlinkert
License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
This file was generated by verb-cli on October 11, 2014.