{"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":"3.0.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":{"filter-values":"^0.4.1","glob-object":"^1.0.0","isobject":"^3.0.0"},"devDependencies":{"gulp-format-md":"^0.1.12","mocha":"^3.4.2"},"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"]},"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"lint":{"reflinks":true},"reflinks":["filter-values","glob-object"]},"gitHead":"3e42f9ce0e3cf5808728ee9e14b90f99053b3517","_id":"filter-object@3.0.0","_npmVersion":"5.0.3","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"integrity":"sha512-V33qaMFJ20twiI/XsRQQpWdReoCtlgDBB7PfA2Ba1xRQGafWU+Jj7EXvDje1fgAiMcyC/K8T+vnO5uCQ4k8+UQ==","shasum":"eb4932f7e3d9becd4208f12ee836f164b4997546","tarball":"http://registry-npm.ywwl.com/filter-object/download/filter-object-3.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoDjNxFSxprigedFhMHIegF51fDlHM8HOgWsZQQqsEPQIhAMVt0awbGoAjrj7BXVnK0Xg1zXqgGGIVVK2Be51CaR2N"}],"size":2824,"noattachment":false,"key":"/filter-object/-/filter-object-3.0.0.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filter-object-3.0.0.tgz_1497882813946_0.7195299409795552"},"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":1497882815470,"_cnpm_publish_time":1497882815470,"dist-tags":{"latest":"3.0.0"}}