{"id":18048525,"url":"https://github.com/bent10/find-similar","last_synced_at":"2025-04-10T09:51:44.295Z","repository":{"id":38228511,"uuid":"486360918","full_name":"bent10/find-similar","owner":"bent10","description":"Finds similar word(s) in a list of words.","archived":false,"fork":false,"pushed_at":"2025-01-05T07:42:39.000Z","size":774,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T08:47:33.686Z","etag":null,"topics":["compare","comparison","diff","difference","distance","edit","fuzzy","leven","levenshtein","match","matching","similar","similarity","string","suggest","text"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/find-similar","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/bent10.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":"2022-04-27T21:49:30.000Z","updated_at":"2024-10-30T12:12:42.000Z","dependencies_parsed_at":"2023-11-26T05:24:52.277Z","dependency_job_id":"6f84f985-3284-4bc8-98d5-7214f74baed4","html_url":"https://github.com/bent10/find-similar","commit_stats":{"total_commits":104,"total_committers":4,"mean_commits":26.0,"dds":0.3076923076923077,"last_synced_commit":"eb4701ef86b6422734989db8b6fdfc93af9d9b15"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bent10%2Ffind-similar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bent10%2Ffind-similar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bent10%2Ffind-similar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bent10%2Ffind-similar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bent10","download_url":"https://codeload.github.com/bent10/find-similar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248197933,"owners_count":21063623,"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":["compare","comparison","diff","difference","distance","edit","fuzzy","leven","levenshtein","match","matching","similar","similarity","string","suggest","text"],"created_at":"2024-10-30T20:13:16.209Z","updated_at":"2025-04-10T09:51:44.263Z","avatar_url":"https://github.com/bent10.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# find-similar\n\nFinds similar word(s) in a list of words.\n\n## Install\n\n```bash\nnpm i find-similar\n```\n\n## Usage\n\nThis package is pure ESM, please read the [esm-package](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).\n\n```js\nimport { findSimilar, didYouMean } from 'find-similar'\n\nconsole.log(findSimilar('foos', ['bar', 'baz', 'foo']))\n// =\u003e ['foo']\n\n// Suggests similar words\nconsole.log(didYouMean('foos', ['bar', 'baz', 'foo']))\n// =\u003e 'Did you mean \"foo\"?'\n```\n\n## API Reference\n\n### `findSimilar(word: string, candidates: readonly string[] | string[], options?: Options): string[]`\n\nFinds similar word(s) in a list of words.\n\n- `word`: The word to find similar words for.\n- `candidates`: An array of words to compare against.\n- `options`: Options for the function (optional).\n  - `maxScore`: Maximum levenshtein distance threshold. (default: 3)\n  - `criteria`: The similarity threshold, a number between 0 and 1. (default: 0.5)\n  - `prefix`: A string to prepend to the suggested word. (default: '')\n\nReturns an array of similar words.\n\n### `didYouMean(word: string, candidates: readonly string[] | string[], options?: Options): string`\n\nSuggests similar words in a list of words.\n\n- `word`: The word to find similar words for.\n- `candidates`: An array of words to compare against.\n- `options`: Options for the function (optional).\n  - `maxScore`: Maximum levenshtein distance threshold. (default: 3)\n  - `criteria`: The similarity threshold, a number between 0 and 1. (default: 0.5)\n  - `prefix`: A string to prepend to the suggested word. (default: '')\n\nReturns a string of suggested words or an empty string if no matches are found.\n\n## Options\n\n- `maxScore`: Maximum levenshtein distance threshold. (default: 3)\n- `criteria`: The similarity threshold, a number between 0 and 1. (default: 0.5)\n- `prefix`: A string to prepend to the suggested word. (default: '')\n\n## Contributing\n\nWe 💛\u0026nbsp; issues.\n\nWhen committing, please conform to [the semantic-release commit standards](https://www.conventionalcommits.org/). Please install `commitizen` and the adapter globally, if you have not already.\n\n```bash\nnpm i -g commitizen cz-conventional-changelog\n```\n\nNow you can use `git cz` or just `cz` instead of `git commit` when committing. You can also use `git-cz`, which is an alias for `cz`.\n\n```bash\ngit add . \u0026\u0026 git cz\n```\n\n## License\n\n![GitHub](https://img.shields.io/github/license/bent10/find-similar)\n\nA project by [Stilearning](https://stilearning.com) \u0026copy; 2022-2023.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbent10%2Ffind-similar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbent10%2Ffind-similar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbent10%2Ffind-similar/lists"}