{"id":21668559,"url":"https://github.com/christoph-jerolimov/fuzzy","last_synced_at":"2025-03-20T07:18:56.479Z","repository":{"id":163691872,"uuid":"639147657","full_name":"christoph-jerolimov/fuzzy","owner":"christoph-jerolimov","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-10T23:26:16.000Z","size":112,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-19T16:45:44.093Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/christoph-jerolimov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-10T21:32:56.000Z","updated_at":"2023-05-11T08:24:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"6d653085-cdb2-4fc5-b3e6-b18164384568","html_url":"https://github.com/christoph-jerolimov/fuzzy","commit_stats":null,"previous_names":["christoph-jerolimov/fuzzy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoph-jerolimov%2Ffuzzy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoph-jerolimov%2Ffuzzy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoph-jerolimov%2Ffuzzy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoph-jerolimov%2Ffuzzy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christoph-jerolimov","download_url":"https://codeload.github.com/christoph-jerolimov/fuzzy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244566947,"owners_count":20473451,"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-25T12:16:28.450Z","updated_at":"2025-03-20T07:18:56.455Z","avatar_url":"https://github.com/christoph-jerolimov.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚧 just another library to fuzzy search (filter) and show a ranked, maybe highlighted result, wip/under construction 🏗️\n\n### Not yet available on npm. Let me know if you are interested in this. 🤷‍♂️\n\n### v0.0.1\n\n```ts\nconst searchValue = 'abc';\nconst textValues = ['aa bb cc', 'abc', 'abcdef', 'xyz', 'xa xb xc', 'cba'];\n\nconst rateFunc = prioritizeContinualCharactersAndWordStarts(searchValue, whitespaceWordStart);\n\nconst filteredAndOrderedValues = orderedStringArrayByRate(rateFunc)(textValues);\n\n// [ 'abc',         // exact match\n//   'aa bb cc',    // each word starts with one of the searched character (a b c)\n//   'abcdef',      // contains all characters, close together\n//   'xa xb xc'     // contains also all characters, but seperated\n// ]\n```\n\n### features\n\n* [x] super tiny (just a few kb)\n* [x] no dependencies\n* [x] works in the browser and on the server\n* [x] highly customizable for your use case, for example:\n  * [x] prioritize when the search matches a word start,\n\n    so that a search `FS` can rank the words **_higher_** then e.g. `fantastic`:\n\n    * [x] fuzzy search (whitespaces)\n    * [x] fuzzy-search (kebab-case)\n    * [x] fuzzy_search (underscore)\n    * [x] FUZZY_SEARCH (underscore)\n    * [x] fuzzySearch (pascalCase)\n    * [x] FuzzySearch (CamelCase)\n    * [x] any other custom schema\n\n### roadmap:\n\n* [ ] setup a build script\n* [ ] linter, formatter\n* [ ] test the result with npm, yarn, in the browser and with other JS VMs like deno\n* [ ] cleanup the low level api (utils as shown above) and create a new high level api (one liner)\n* [ ] make it available on npm\n* [ ] small website to demo it?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristoph-jerolimov%2Ffuzzy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristoph-jerolimov%2Ffuzzy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristoph-jerolimov%2Ffuzzy/lists"}