Filter an array to have only function values, or an object to have only properties with function values.
Install with npm
$ npm i filter-functions --save
var functions = require('filter-functions');
var a = function(){};
var c = function(){};
var e = function(){};
var obj = {a: a, b: 'b', c: c, d: 'd', e: e};
functions(obj);
//=> {a: a, c: c, e: e});
functions([a, 'b', c, 'd', e]);
//=> [a, c, e]
- filter-keys: Filter the keys of an object using glob patterns.
- filter-object: Return a copy of an object, filtered to have only keys that match the given… more
- filter-values: Filter an object values using glob patterns or with a
callback
function returns true.
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on May 29, 2015.