{"name":"filter-object","description":"Filter an object by its keys or values. Returns a copy of an object filtered to have only keys or values that match the given glob patterns.","version":"2.1.0","homepage":"https://github.com/jonschlinkert/filter-object","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/filter-object.git"},"bugs":{"url":"https://github.com/jonschlinkert/filter-object/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"extend-shallow":"^2.0.1","filter-keys":"^1.0.2","filter-values":"^0.4.0","kind-of":"^2.0.1","object.pick":"^1.1.1"},"devDependencies":{"mocha":"^2.2.1"},"keywords":["arr","array","expand","filter","find","function","glob","globbing","globs","key","keys","match","matcher","minimatch","obj","object","order","pattern","patterns","sort","wildcard"],"verb":{"related":{"list":["filter-keys","filter-values","micromatch","rename-keys","sort-object"]}},"gitHead":"91d2fd0bb96b95460c583bc2aa88aad243ca5773","_id":"filter-object@2.1.0","_shasum":"af9c0ad0bb40a006946b84b4db33c3ae5e93df86","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"af9c0ad0bb40a006946b84b4db33c3ae5e93df86","tarball":"http://registry-npm.ywwl.com/filter-object/download/filter-object-2.1.0.tgz","integrity":"sha512-T9XkZU8b543bVsPanQFCVqLpMpd9Ma9WL0ru2vaGhF+PFyn/ZKrTQ+i47oeT3sgZL8Zq+Uy69azSkNYXuHTQGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGMSSMqeBNQ+Mn4pITjwpwQr64K5YcpICMX8eBjYIXpAIhANO4tzxUQ9WBYKOkwkSXlLq0ggpbfs05hZMxF0//ny9h"}],"size":2485,"noattachment":false,"key":"/filter-object/-/filter-object-2.1.0.tgz"},"directories":{},"readme":"# filter-object [![NPM version](https://img.shields.io/npm/v/filter-object.svg?style=flat)](https://www.npmjs.com/package/filter-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/filter-object.svg?style=flat)](https://npmjs.org/package/filter-object) [![NPM total downloads](https://img.shields.io/npm/dt/filter-object.svg?style=flat)](https://npmjs.org/package/filter-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/filter-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/filter-object)\n\n> Filter an object by its keys or values. Returns a copy of an object filtered to have only keys or values that match the given glob patterns.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save filter-object\n```\n\n## Usage\n\n### Filter with glob patterns\n\n```js\nvar filter = require('filter-object');\n\nconsole.log(filter({a: 'a', b: 'b', c: 'c'}, '*'));\n//=> {a: 'a', b: 'b', c: 'c'}\n\nconsole.log(filter({a: 'a', b: 'b', c: 'c'}, 'b'));\n//=> {b: 'b'}\n\nconsole.log(filter({foo: 'a', bar: 'b', baz: 'c'}, 'b*'));\n//=> {bar: 'b', baz: 'c'}\n\nconsole.log(filter({a: 'a', b: 'b', c: 'c'}, '{b,c}'));\n//=> {b: 'b', c: 'c'}\n\nconsole.log(filter({a: 'a', b: 'b', c: 'c'}, ['a', 'b']));\n//=> {a: 'a', b: 'b'}\n```\n\n**Negation patterns**\n\n```js\nconsole.log(filter({foo: 'a', bar: 'b', baz: 'c'}, ['!b*']));\n//=> { foo: 'a' }\n\nconsole.log(filter({a: {b: {foo: 'a', bar: 'b', baz: 'c'}}}, ['!a.b.b*']));\n//=> {a: {b: {foo: 'a'}}}\n```\n\n### options\n\nOptions are passed to [glob-object](https://github.com/jonschlinkert/glob-object) and/or [filter-values](https://github.com/jonschlinkert/filter-values)\n\n```js\nfilter({foo: 'a', bar: 'b', baz: 'c'}, ['*', '!b*'], options);\n```\n\nSee [glob-object](https://github.com/jonschlinkert/glob-object) and/or [filter-values](https://github.com/jonschlinkert/filter-values) for the full range of options and available features.\n\n## About\n\n### Related projects\n\n* [filter-keys](https://www.npmjs.com/package/filter-keys): Filter the keys of an object using glob patterns. | [homepage](https://github.com/jonschlinkert/filter-keys \"Filter the keys of an object using glob patterns.\")\n* [filter-values](https://www.npmjs.com/package/filter-values): Filter an object values using glob patterns or with a `callback` function returns true.  | [homepage](https://github.com/jonschlinkert/filter-values \"Filter an object values using glob patterns or with a `callback` function returns true. \")\n* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch \"Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.\")\n* [rename-keys](https://www.npmjs.com/package/rename-keys): Modify the names of the own enumerable properties (keys) of an object. | [homepage](https://github.com/jonschlinkert/rename-keys \"Modify the names of the own enumerable properties (keys) of an object.\")\n* [sort-object](https://www.npmjs.com/package/sort-object): Sort the keys in an object. | [homepage](https://github.com/doowb/sort-object \"Sort the keys in an object.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 19, 2017._","publish_time":1441691906940,"_cnpm_publish_time":1441691906940,"dist-tags":{"latest":"3.0.0"}}