{"id":22828673,"url":"https://github.com/busterc/fuzzysort-collection","last_synced_at":"2025-03-31T01:18:00.925Z","repository":{"id":57243427,"uuid":"100990124","full_name":"busterc/fuzzysort-collection","owner":"busterc","description":":mag: Fast SublimeText-like fuzzy search for collections","archived":false,"fork":false,"pushed_at":"2018-08-25T21:55:08.000Z","size":50,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-12T07:59:51.630Z","etag":null,"topics":["collections","filter","fuzzy","fuzzy-search","sorting-algorithms"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/busterc.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":"2017-08-21T20:30:30.000Z","updated_at":"2023-09-08T17:28:58.000Z","dependencies_parsed_at":"2022-09-15T10:00:29.261Z","dependency_job_id":null,"html_url":"https://github.com/busterc/fuzzysort-collection","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busterc%2Ffuzzysort-collection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busterc%2Ffuzzysort-collection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busterc%2Ffuzzysort-collection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busterc%2Ffuzzysort-collection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/busterc","download_url":"https://codeload.github.com/busterc/fuzzysort-collection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246399803,"owners_count":20770909,"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":["collections","filter","fuzzy","fuzzy-search","sorting-algorithms"],"created_at":"2024-12-12T19:11:21.857Z","updated_at":"2025-03-31T01:18:00.891Z","avatar_url":"https://github.com/busterc.png","language":"JavaScript","readme":"# fuzzysort-collection [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]\n\u003e Fast SublimeText-like fuzzy search for collections\n\nThanks to [@farzher](https://github.com/farzher) for [fuzzysort](https://github.com/farzher/fuzzysort)\n\n## Installation\n\n```sh\n$ npm install --save fuzzysort-collection\n```\n\n## Usage\n\n```js\nconst fuzz = require('fuzzysort-collection');\n\n// You can config fuzzysort options:\n// https://github.com/farzher/fuzzysort#options\nfuzz.fuzzysort.highlightOpen = '\u003cstrong\u003e';\nfuzz.fuzzysort.highlightClose = '\u003c/strong\u003e';\n\nconst crop = [{\n  a: {\n    b: 'Snap'\n  }\n}, {\n  a: {\n    b: 'Paypal'\n  }\n}, {\n  a: {\n    b: 'Google'\n  }\n}, {\n  a: {\n    b: 'Apple'\n  }\n}];\n\nlet cream = fuzz('ap', crop, 'a.b');\n/*\n[\n  {\n    \"meta\": {\n      \"matches\": [\n        0,\n        1\n      ],\n      \"target\": \"Apple\",\n      \"lower\": \"apple\",\n      \"score\": 3,\n      \"theMatches\": [\n        0,\n        1\n      ],\n      \"highlighted\": \"\u003cstrong\u003eAp\u003c/strong\u003eple\"\n    },\n    \"data\": {\n      \"a\": {\n        \"b\": \"Apple\"\n      }\n    }\n  },\n  {\n    \"meta\": {\n      \"matches\": [\n        2,\n        3\n      ],\n      \"target\": \"Snap\",\n      \"lower\": \"snap\",\n      \"score\": 2002,\n      \"theMatches\": [\n        2,\n        3\n      ],\n      \"highlighted\": \"Sn\u003cstrong\u003eap\u003c/strong\u003e\"\n    },\n    \"data\": {\n      \"a\": {\n        \"b\": \"Snap\"\n      }\n    }\n  },\n  {\n    \"meta\": {\n      \"matches\": [\n        1,\n        3\n      ],\n      \"target\": \"Paypal\",\n      \"lower\": \"paypal\",\n      \"score\": 4004,\n      \"theMatches\": [\n        1,\n        3\n      ],\n      \"highlighted\": \"P\u003cstrong\u003ea\u003c/strong\u003ey\u003cstrong\u003ep\u003c/strong\u003eal\"\n    },\n    \"data\": {\n      \"a\": {\n        \"b\": \"Paypal\"\n      }\n    }\n  }\n]\n*/\n```\n## License\n\nISC © [Buster Collings](https://about.me/buster)\n\n\n[npm-image]: https://badge.fury.io/js/fuzzysort-collection.svg\n[npm-url]: https://npmjs.org/package/fuzzysort-collection\n[travis-image]: https://travis-ci.org/busterc/fuzzysort-collection.svg?branch=master\n[travis-url]: https://travis-ci.org/busterc/fuzzysort-collection\n[daviddm-image]: https://david-dm.org/busterc/fuzzysort-collection.svg?theme=shields.io\n[daviddm-url]: https://david-dm.org/busterc/fuzzysort-collection\n[coveralls-image]: https://coveralls.io/repos/busterc/fuzzysort-collection/badge.svg\n[coveralls-url]: https://coveralls.io/r/busterc/fuzzysort-collection\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbusterc%2Ffuzzysort-collection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbusterc%2Ffuzzysort-collection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbusterc%2Ffuzzysort-collection/lists"}