{"id":18850780,"url":"https://github.com/luqmanoop/use-command-score","last_synced_at":"2026-05-01T18:32:01.225Z","repository":{"id":167981155,"uuid":"640813067","full_name":"luqmanoop/use-command-score","owner":"luqmanoop","description":"Tiny, fast fuzzy ⚡️earch for React applications","archived":false,"fork":false,"pushed_at":"2023-05-18T13:23:08.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T23:40:53.823Z","etag":null,"topics":["autcomplete","filter","fuzzy-matching","fuzzy-search","list","react","search","typescript"],"latest_commit_sha":null,"homepage":"https://use-command-score.vercel.app","language":"TypeScript","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/luqmanoop.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-15T07:22:27.000Z","updated_at":"2024-03-19T20:43:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"2d14a115-84bb-4554-8ad8-e4d0876a4da2","html_url":"https://github.com/luqmanoop/use-command-score","commit_stats":null,"previous_names":["codeshifu/use-command-score","luqmanoop/use-command-score"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/luqmanoop/use-command-score","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luqmanoop%2Fuse-command-score","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luqmanoop%2Fuse-command-score/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luqmanoop%2Fuse-command-score/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luqmanoop%2Fuse-command-score/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luqmanoop","download_url":"https://codeload.github.com/luqmanoop/use-command-score/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luqmanoop%2Fuse-command-score/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32508900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["autcomplete","filter","fuzzy-matching","fuzzy-search","list","react","search","typescript"],"created_at":"2024-11-08T03:31:33.383Z","updated_at":"2026-05-01T18:32:01.185Z","avatar_url":"https://github.com/luqmanoop.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# use-command-score\n\n\u003e Tiny, fast fuzzy ⚡️earch for React applications\n\nLive demo https://use-command-score.vercel.app\n\n## Install\n\n```sh\nnpm install use-command-score\n```\n\n## Usage\n\n```ts\nimport { useCommandScore } from \"use-command-score\";\n\nuseCommandScore(needle, haystack, options);\n```\n\n## Examples\n\nSearch array of strings\n\n```ts\nuseCommandScore(\"vsc\", [\"Vim\", \"Google chrome\", \"Visual studio code\"]); // ['Visual studio code']\n```\n\nSearch array of objects \u0026 limit result [Live demo](https://use-command-score.vercel.app/?path=/story/moviesfuzzysearch--with-limit)\n\n```ts\nuseCommandScore(\"hger\", movies, {\n  limit: 3,\n  keys: [\"title\", \"meta.actors\", \"meta.director\"]\n});\n```\n\n## API\n\n`useCommandScore(needle, haystack, options)`\n\n### needle\n\nSearch query\n\nType: `string`\n\nRequired: `true`\n\n### haystack\n\nArray of items to search\n\nType: `Array\u003cT\u003e`\n\nRequired: `true`\n\n### options\n\nType: `object`\n\nRequired: `false`\n\n#### options.keys\n\nObject key paths in `haystack`. The value of the key paths will be matched against `needle`\n\nType: `Array\u003cstring\u003e`\n\nRequired: `false`\n\n```ts\nconst data = [\n  { name: \"a\", address: { code: \"123\" } },\n  { name: \"b\", address: { code: \"456\" } }\n];\n\nuseCommandScore(\"4\", data, { keys: [\"name\", \"address.code\"] });\n```\n\n#### options.limit\n\nLimits the total results returned\n\nType: `number`\n\nRequired: `false`\n\n```ts\nuseCommandScore(needle, haystack, { limit: 5 });\n```\n\n## Related\n\n- [command score](https://github.com/superhuman/command-score)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluqmanoop%2Fuse-command-score","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluqmanoop%2Fuse-command-score","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluqmanoop%2Fuse-command-score/lists"}