{"id":18557395,"url":"https://github.com/prestaul/fast-filter","last_synced_at":"2025-04-10T01:32:13.687Z","repository":{"id":25845024,"uuid":"29284606","full_name":"Prestaul/fast-filter","owner":"Prestaul","description":"Array filtering faster than the native array.filter method","archived":false,"fork":false,"pushed_at":"2017-03-23T14:31:03.000Z","size":6,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T16:47:12.515Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Prestaul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-15T06:44:03.000Z","updated_at":"2022-09-01T08:27:24.000Z","dependencies_parsed_at":"2022-07-24T07:17:23.267Z","dependency_job_id":null,"html_url":"https://github.com/Prestaul/fast-filter","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prestaul%2Ffast-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prestaul%2Ffast-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prestaul%2Ffast-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prestaul%2Ffast-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Prestaul","download_url":"https://codeload.github.com/Prestaul/fast-filter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248140667,"owners_count":21054333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T21:35:30.174Z","updated_at":"2025-04-10T01:32:08.653Z","avatar_url":"https://github.com/Prestaul.png","language":"JavaScript","readme":"# fast-filter\n\nA replacement for the native `[].filter` method that performs ~5-10 times faster~ [about twice as fast](http://jsperf.com/fastfilter-vs-native-array-filter) in most environments. (Note: As JS engine performance keeps improving, this module becomes less relevant. YMMV.)\n\n## Install\n\n```bash\nnpm install fast-filter\n```\n\n## Basic usage\n```js\nvar fastFilter = require('fast-filter');\n\nfastFilter([1,2,3,4,5,6], function(val) { return val % 2; }); // [1,3,5]\n```\n\n## \"Installing\" on the Array.prototype\nYou can add `fastFilter` to the native `Array.prototype` for convienience.\n```js\nrequire('fast-filter').install();\n\n[1,2,3,4,5,6].fastFilter(function(val) { return val % 2; }); // [1,3,5]\n```\n\nOr provide an alias:\n```js\nrequire('fast-filter').install('select');\n\n[1,2,3,4,5,6].select(function(val) { return val % 2; }); // [1,3,5]\n```\n\n## Replacing the native `filter` method\nYou can replace the native `Array.prototype.filter` method, but keep in mind that this will modify the `filter` method for all code in this instance including any required modules and may result in unexpected behavior.\n```js\nrequire('fast-filter').install('filter');\n\n[1,2,3,4,5,6].filter(function(val) { return val % 2; }); // [1,3,5]\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprestaul%2Ffast-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprestaul%2Ffast-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprestaul%2Ffast-filter/lists"}