npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

filter-functions

0.1.0

@jonschlinkert

npmHomeRepoSnykSocket
Downloads:98
$ npm install filter-functions
DailyWeeklyMonthlyYearly

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

  • github/jonschlinkert
  • twitter/jonschlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


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