0.1.0 • Published 9 years ago

filter-functions v0.1.0

Weekly downloads
13
License
MIT
Repository
github
Last release
9 years ago

filter-functions NPM version

Filter an array to have only function values, or an object to have only properties with function values.

Install

Install with npm

$ npm i filter-functions --save

Usage

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]

Related projects

  • 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.

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on May 29, 2015.