{"id":26759538,"url":"https://github.com/tad-lispy/node-damerau-levenshtein","last_synced_at":"2025-04-04T19:15:22.788Z","repository":{"id":45338342,"uuid":"12455655","full_name":"tad-lispy/node-damerau-levenshtein","owner":"tad-lispy","description":"Damerau - Levenstein distance function for node","archived":false,"fork":false,"pushed_at":"2024-07-19T19:04:47.000Z","size":458,"stargazers_count":46,"open_issues_count":7,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T17:18:54.325Z","etag":null,"topics":["damerau","javascript","levenshtein","nodejs","similarity"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tad-lispy.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":"2013-08-29T08:47:24.000Z","updated_at":"2024-10-30T10:16:08.000Z","dependencies_parsed_at":"2024-07-19T22:11:30.434Z","dependency_job_id":"d6ee83b9-e81d-465a-9d4d-c06c9fdf6d9d","html_url":"https://github.com/tad-lispy/node-damerau-levenshtein","commit_stats":{"total_commits":57,"total_committers":6,"mean_commits":9.5,"dds":"0.26315789473684215","last_synced_commit":"cb6c4d981c615a64671e3dd2389063526b3db974"},"previous_names":["lzrski/node-damerau-levenshtein"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tad-lispy%2Fnode-damerau-levenshtein","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tad-lispy%2Fnode-damerau-levenshtein/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tad-lispy%2Fnode-damerau-levenshtein/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tad-lispy%2Fnode-damerau-levenshtein/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tad-lispy","download_url":"https://codeload.github.com/tad-lispy/node-damerau-levenshtein/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234930,"owners_count":20905854,"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":["damerau","javascript","levenshtein","nodejs","similarity"],"created_at":"2025-03-28T17:19:04.698Z","updated_at":"2025-04-04T19:15:22.763Z","avatar_url":"https://github.com/tad-lispy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM](https://nodei.co/npm/damerau-levenshtein.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/damerau-levenshtein/)\n\nIt provides a function that takes two string arguments and returns a hash like this:\n\n``` javascript\n{\n  steps: 5,       // Levenstein demerau distance\n  relative: 0.7,  // steps / length of the longer string\n  similarity: 0.3 // 1 - relative\n}\n```\n\n## Install\n\n```sh\nnpm install damerau-levenshtein\n```\n\n## Use with ES6 modules\n\n```js\nimport * as levenshtein from 'damerau-levenshtein';\n\nconst lev = levenshtein('hello world', 'Hello World!');\n// { steps: 4, relative: 0.3076923076923077, similarity: 0.6923076923076923 }\n```\n\nPlease see [tests](./test/test.js) for more insights.\n\n## Use with TypeScript\n\n```ts\nimport * as levenshtein from 'damerau-levenshtein';\n\ninterface LevenshteinResponse {\n  steps: number;\n  relative: number;\n  similarity: number;\n}\n\nconst lev: LevenshteinResponse = levenshtein('hello world', 'Hello World!');\n\nconsole.log(lev.steps);\n// 2\nconsole.log(lev.foo);\n// TypeScript Error: Property 'foo' does not exist on type 'LevenshteinResponse'.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftad-lispy%2Fnode-damerau-levenshtein","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftad-lispy%2Fnode-damerau-levenshtein","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftad-lispy%2Fnode-damerau-levenshtein/lists"}