Miss any of our Open RFC calls?Watch the recordings here! »

filter-keys

1.0.2 • Public • Published

filter-keys NPM version Build Status

Filter the keys of an object using glob patterns.

Install with npm

npm i filter-keys --save

Usage

var filterKeys = require('filter-keys');
 
filterKeys({foo: 'a', bar: 'b', baz: 'c'}, 'b*');
//=> ['bar', 'baz']

Related

  • filter-object: Return a copy of an object, filtered to have only keys that match the given glob patterns.
  • filter-values: Filter an object to have only the own properties for which a callback function returns true.
  • micromatch: Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just use micromatch.isMatch() instead of minimatch(), or use micromatch() instead of multimatch().
  • rename-keys: Modify the names of the own enumerable properties (keys) of an object.
  • sort-object: Sort the keys in an object.

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 (c) 2015 Jon Schlinkert
Released under the MIT license


This file was generated by verb-cli on March 31, 2015.

Install

npm i [email protected]

Version

1.0.2

License

MIT

Last publish

Collaborators

  • avatar