filter-functions
Filter an array to have only function values, or an object to have only properties with function values.
Last updated 11 years ago by jonschlinkert .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install filter-functions 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.1.0                                ...           latest (11 years ago)

1 Versions

  • 0.1.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |