{"_id":"filter-array","_rev":"439992","name":"filter-array","description":"Iterates over the elements in an array, returning an array with only the elements for which the callback returns truthy.","dist-tags":{"latest":"0.2.0"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-08-05T06:31:42.000Z","created":"2014-12-12T11:54:57.552Z","0.2.0":"2015-05-02T03:19:25.527Z","0.1.0":"2014-12-12T11:54:57.552Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/filter-array.git"},"versions":{"0.2.0":{"name":"filter-array","description":"Iterates over the elements in an array, returning an array with only the elements for which the callback returns truthy.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/filter-array","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/filter-array.git"},"bugs":{"url":"https://github.com/jonschlinkert/filter-array/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/filter-array/blob/master/LICENSE"},"files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha","test-cov":"istanbul cover _mocha","test-travis":"istanbul cover _mocha --report lcovonly"},"dependencies":{"arr-filter":"^1.1.0","kind-of":"^1.1.0","micromatch":"^2.1.0"},"devDependencies":{"istanbul-harmony":"^0.3.1","mocha":"^2.2.1"},"keywords":["array","match","elements","filter","iterate"],"gitHead":"71c084195043cdf9d452faff9ae5e18e2c359a86","_id":"filter-array@0.2.0","_shasum":"9f6f4ceaf5b5e8a6b674a5b5460537714a8c51f1","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"9f6f4ceaf5b5e8a6b674a5b5460537714a8c51f1","size":2443,"noattachment":false,"key":"/filter-array/-/filter-array-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/filter-array/download/filter-array-0.2.0.tgz"},"directories":{},"publish_time":1430536765527,"_cnpm_publish_time":1430536765527,"_hasShrinkwrap":false},"0.1.0":{"name":"filter-array","description":"Iterates over the elements in an array, returning an array with only the elements for which the callback returns truthy.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/filter-array","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/filter-array.git"},"bugs":{"url":"https://github.com/jonschlinkert/filter-array/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/filter-array/blob/master/LICENSE-MIT"},"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"dependencies":{"make-iterator":"^0.1.1"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["array","elements","filter","iterate","util","utilities","utils","values"],"_id":"filter-array@0.1.0","_shasum":"c50873f9b568a1001a4eca6494ac82f11559a666","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"c50873f9b568a1001a4eca6494ac82f11559a666","size":2669,"noattachment":false,"key":"/filter-array/-/filter-array-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/filter-array/download/filter-array-0.1.0.tgz"},"directories":{},"publish_time":1418385297552,"_cnpm_publish_time":1418385297552,"_hasShrinkwrap":false}},"readme":"# filter-array [![NPM version](https://badge.fury.io/js/filter-array.svg)](http://badge.fury.io/js/filter-array)\n\n> Iterates over the elements in an array, returning an array with only the elements for which the callback returns truthy.\n\n## Install with [npm](npmjs.org)\n\n```bash\nnpm i filter-array --save\n```\n\n## Usage\n\n### [filterArray](index.js#L36)\n\nFilter array against given glob patterns, regex or given function.\n\n**Params**\n\n* `arr` **{Array}**: array to filter\n* `filters` **{Array|String|Function|RegExp}**\n* `opts` **{Object}**: options to pass to [micromatch](https://github.com/jonschlinkert/micromatch)\n* `returns` **{Array}**\n\n**Example**\n\n```js\nvar filter = require('filter-array');\n\nfilter(['a', 'b', 'c', 'b', 'c', 'e'], function(ele) {\n  return ele === 'a' || ele === 'b';\n});\n\n//=> ['a', 'b', 'b']\n```\n\nFor more examples see the [tests](./test.js)\n\n## Related\n\n* [arr-filter](https://github.com/jonschlinkert/arr-filter): Faster alternative to javascript's native filter method.\n* [filter-object](https://github.com/jonschlinkert/filter-object): Return a copy of an object, filtered to have only keys that match the given… [more](https://github.com/jonschlinkert/filter-object)\n* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://github.com/jonschlinkert/micromatch)\n\n## Run Tests\n\nInstall dev dependencies:\n\n```bash\nnpm i -d && npm test\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/filter-array/issues)\n\n## Author\n\n**Jon Schlinkert**\n\n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright (c) 2014-2015 Jon Schlinkert\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 01, 2015._\n\n<!-- reflinks generated by verb-reflinks plugin -->\n","_attachments":{},"homepage":"https://github.com/jonschlinkert/filter-array","bugs":{"url":"https://github.com/jonschlinkert/filter-array/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/filter-array/blob/master/LICENSE"}}