{"name":"filter-object","description":"Return a copy of an object, filtered to have only keys that match the given glob patterns.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/filter-object","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/filter-object.git"},"bugs":{"url":"https://github.com/jonschlinkert/filter-object/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/filter-object/blob/master/LICENSE-MIT"}],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"dependencies":{"extend-shallow":"^0.1.1","filter-keys":"^0.1.1","sort-object":"^0.3.1"},"devDependencies":{"mocha":"*","should":"^4.3.0"},"keywords":["arr","array","expand","filter","find","function","glob","globbing","globs","js","key","keys","match","matcher","minimatch","obj","object","order","pattern","patterns","sort","util","utility","wildcard"],"_id":"filter-object@0.2.0","_shasum":"c6401db957cdaa10779eece974b2042d119786c0","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"c6401db957cdaa10779eece974b2042d119786c0","tarball":"http://registry-npm.ywwl.com/filter-object/download/filter-object-0.2.0.tgz","integrity":"sha512-zayJQlbHIfG8L3ZQS0x3VpTY60f0Xd8sHY10gFMt8s3OPQTalUCwJbD/dNJ4T4qdnz7WFV4qNC5VvA2J1m/KVQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFrXRoeMal+Ogbe2tkRVEze65baU6wYA6pdZCuJ3ORfMAiA/FUuo5OERW1A3JqGsZDDfRUZJkK2iTMD0MZHcvnnRuw=="}],"size":3093,"noattachment":false,"key":"/filter-object/-/filter-object-0.2.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":1416807374094,"_cnpm_publish_time":1416807374094,"dist-tags":{"latest":"3.0.0"}}