{"name":"levenshtein-edit-distance","version":"3.0.0","description":"Levenshtein edit distance. No cruft. Real fast.","license":"MIT","keywords":["vladimir","levenshtein","edit","distance","bin","cli"],"homepage":"https://words.github.io/levenshtein-edit-distance/","repository":{"type":"git","url":"git+https://github.com/words/levenshtein-edit-distance.git"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"bugs":{"url":"https://github.com/words/levenshtein-edit-distance/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","bin":{"levenshtein-edit-distance":"cli.js"},"main":"index.js","types":"index.d.ts","devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^9.0.0","remark-preset-wooorm":"^8.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","xo":"^0.38.0"},"scripts":{"prepack":"npm run build && npm run format","build":"rimraf \"*.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test.js","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"rules":{"no-multi-assign":"off","no-var":"off","prefer-arrow-callback":"off"}},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true},"gitHead":"d59e54abe3c88cfc33ba186ec10789f589608066","_id":"levenshtein-edit-distance@3.0.0","_nodeVersion":"15.11.0","_npmVersion":"7.6.2","dist":{"integrity":"sha512-ECa2AObkZJtLWFq0wbqL3qN6loTHLDULSXImm8Hw/6P4d2qZNaFFrfUMoncAIxjYEKk8fKTXv9y6DYyeHz/7sQ==","shasum":"7a984447c3cb673d1f7d48e49a41ef4745888c9d","tarball":"http://registry-npm.ywwl.com/levenshtein-edit-distance/download/levenshtein-edit-distance-3.0.0.tgz","fileCount":6,"unpackedSize":10150,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbKAICRA9TVsSAnZWagAAzj4P/1hIIRMUOh/VhN7owFWO\nClJHt+u1E7p45DLG4HBr6osVm02wU0RMSgREEkyAyso8wqX079CNV8betV/p\nc1OAUFp7V+mhIjdqO9a3YDX4Ssp6Y57t3QIQCRmZda3ywIyYwo3nrx4oRMzS\nirPrcp3flcgo9XSEly6xgWw6sUVzy1BT9pX8IxyF/TNFHv98MsKxG34pTuCE\n+bWLVNHvt1vMrKt+nXSdQuC4JuVNN2fUPptNEn2AKRqidBFedDLBft3dObOf\ncIkXdyOE/HhYoh0DmvyR1DNVC1M0pX7PGdqGX440vNvJw/+MYPajBI/yzZSk\nMBppFvaSWcj0aCL1x4RqwMpM00EREflyaLhUll0FSXfzg/G5GWmsXecfQymw\nj1gDGQT+CpMkLU1lO1kC/1EWGVMXvFB1RbJOQ5dwcwOaZmGnm8cY9FVjoPcH\nYj1g8kRgt/uAQJ3xguMsrihMcwdMtqMUXCHJXnQwQXADOacCv9DFtt1Dgizs\nO2ZqhYZRjz6D9DBGXGeA4QsHkJ0o/vVYKPtT5eB93egBEtCdXZPqLd85uK5u\nchsXk0HPMRT4hGoMI4V+X++SD8KCWs6t6AQGCnM9yvDddWTTeqJfv41XBSJX\n9mcJF/S2lPhUXPvOaAZFp52SAMzQ70yvLhZB7Gr5KiKaxrAaLVdpLJBImHbQ\nU1Cl\r\n=Oc+o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGnRNDQDZCIcBKvh4M+RXz6+MWTtKqT5SGadkBbfnEEJAiEAoThxGPr2dyY2jXAWj9ty1iEE/rCwOeeC40RzcL71WDw="}],"size":3838,"noattachment":false,"key":"/levenshtein-edit-distance/-/levenshtein-edit-distance-3.0.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"},{"name":"zeke","email":"zeke@sikelianos.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/levenshtein-edit-distance_3.0.0_1617731592293_0.1949695483007321"},"_hasShrinkwrap":false,"readme":"# levenshtein-edit-distance\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n\n[Levenshtein distance][wiki] (by [Vladimir Levenshtein][vlad]).\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`levenshteinEditDistance(value, other[, insensitive])`](#levenshteineditdistancevalue-other-insensitive)\n*   [CLI](#cli)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [Security](#security)\n*   [License](#license)\n\n## What is this?\n\nThis package exposes a string similarity algorithm.\nThat means it gets two strings (typically words), and turns it into the minimum\nnumber of single-character edits (insertions, deletions or substitutions)\nneeded to turn one string into the other.\n\n## When should I use this?\n\nYou’re probably dealing with natural language, and know you need this, if\nyou’re here!\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 14.14+, 16.0+), install with [npm][]:\n\n```sh\nnpm install levenshtein-edit-distance\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {levenshteinEditDistance} from 'https://esm.sh/levenshtein-edit-distance@3'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {levenshteinEditDistance} from 'https://esm.sh/levenshtein-edit-distance@3?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {levenshteinEditDistance} from 'levenshtein-edit-distance'\n\nlevenshteinEditDistance('levenshtein', 'levenshtein') // => 0\nlevenshteinEditDistance('sitting', 'kitten') // => 3\nlevenshteinEditDistance('gumbo', 'gambol') // => 2\nlevenshteinEditDistance('saturday', 'sunday') // => 3\n\n// Insensitive to order:\nlevenshteinEditDistance('aarrgh', 'aargh') === levenshtein('aargh', 'aarrgh') // => true\n\n// Sensitive to ASCII casing by default:\nlevenshteinEditDistance('DwAyNE', 'DUANE') !== levenshtein('dwayne', 'DuAnE') // => true\n// Insensitive:\nlevenshteinEditDistance('DwAyNE', 'DUANE', true) === levenshtein('dwayne', 'DuAnE', true) // => true\n```\n\n## API\n\nThis package exports the identifier `levenshteinEditDistance`.\nThere is no default export.\n\n### `levenshteinEditDistance(value, other[, insensitive])`\n\nLevenshtein edit distance.\n\n###### `value`\n\nPrimary value (`string`, required).\n\n###### `other`\n\nOther value (`string`, required).\n\n###### `insensitive`\n\nCompare insensitive to ASCII casing (`boolean`, default: `false`).\n\n##### Returns\n\nDistance between `value` and `other` (`number`).\n\n## CLI\n\n```txt\nUsage: levenshtein-edit-distance [options] word word\n\nLevenshtein edit distance.\n\nOptions:\n\n  -h, --help           output usage information\n  -v, --version        output version number\n  -i, --insensitive    ignore casing\n\nUsage:\n\n# output distance\n$ levenshtein-edit-distance sitting kitten\n# 3\n\n# output distance from stdin\n$ echo \"saturday,sunday\" | levenshtein-edit-distance\n# 3\n```\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports no additional types.\n\n## Compatibility\n\nThis package is at least compatible with all maintained versions of Node.js.\nAs of now, that is Node.js 14.14+ and 16.0+.\nIt also works in Deno and modern browsers.\n\n## Related\n\n*   [`levenshtein.c`](https://github.com/wooorm/levenshtein.c)\n    — C API\n*   [`levenshtein`](https://github.com/wooorm/levenshtein)\n    — C CLI\n*   [`levenshtein-rs`](https://github.com/wooorm/levenshtein-rs)\n    — Rust API\n*   [`stemmer`](https://github.com/words/stemmer)\n    — porter stemming algorithm\n*   [`lancaster-stemmer`](https://github.com/words/lancaster-stemmer)\n    — lancaster stemming algorithm\n*   [`double-metaphone`](https://github.com/words/double-metaphone)\n    — double metaphone algorithm\n*   [`soundex-code`](https://github.com/words/soundex-code)\n    — soundex algorithm\n*   [`dice-coefficient`](https://github.com/words/dice-coefficient)\n    — sørensen–dice coefficient\n*   [`syllable`](https://github.com/words/syllable)\n    — syllable count of English words\n\n## Contribute\n\nYes please!\nSee [How to Contribute to Open Source][contribute].\n\n## Security\n\nThis package is safe.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/words/levenshtein-edit-distance/workflows/main/badge.svg\n\n[build]: https://github.com/words/levenshtein-edit-distance/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/words/levenshtein-edit-distance.svg\n\n[coverage]: https://codecov.io/github/words/levenshtein-edit-distance\n\n[downloads-badge]: https://img.shields.io/npm/dm/levenshtein-edit-distance.svg\n\n[downloads]: https://www.npmjs.com/package/levenshtein-edit-distance\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/levenshtein-edit-distance.svg\n\n[size]: https://bundlephobia.com/result?p=levenshtein-edit-distance\n\n[npm]: https://www.npmjs.com\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[contribute]: https://opensource.guide/how-to-contribute/\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[wiki]: https://en.wikipedia.org/wiki/Levenshtein_distance\n\n[vlad]: https://en.wikipedia.org/wiki/Vladimir_Levenshtein\n","publish_time":1617731592428,"_cnpm_publish_time":1617731592428,"dist-tags":{"latest":"3.0.1"}}