Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sindresorhus/leven
Measure the difference between two strings with the fastest JS implementation of the Levenshtein distance algorithm
https://github.com/sindresorhus/leven
Last synced: 2 days ago
JSON representation
Measure the difference between two strings with the fastest JS implementation of the Levenshtein distance algorithm
- Host: GitHub
- URL: https://github.com/sindresorhus/leven
- Owner: sindresorhus
- License: mit
- Created: 2014-08-09T20:34:03.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2021-08-10T12:17:06.000Z (over 3 years ago)
- Last Synced: 2025-01-13T06:15:11.994Z (13 days ago)
- Language: JavaScript
- Homepage:
- Size: 26.4 KB
- Stars: 719
- Watchers: 14
- Forks: 27
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- Funding: .github/funding.yml
- License: license
- Security: .github/security.md
Awesome Lists containing this project
- awesome-nodejs-cn - leven - 使用 Levenshtein 距离算法检测两个字符串之间的差异 (包 / 自然语言处理)
- awesome-nodejs - leven - Measure the difference between two strings using the Levenshtein distance algorithm. ![](https://img.shields.io/github/stars/sindresorhus/leven.svg?style=social&label=Star) (Repository / Natural language processing)
- awesome-nodejs-cn - leven - **star:719** 使用Levenshtein距离算法测量两个字符串之间的差异 (包 / 自然语言处理)
- awesome-github-star - leven
- awesome-imgcook - sindresorhus/leven - Measure the difference between two strings using the Levenshtein distance algorithm. (JavaScript packages for machine learning / Natural language processing)
- awesome-nodejs - leven - Measure the difference between two strings using the Levenshtein distance algorithm. (Packages / Natural language processing)
- awesome-nodejs - leven - Measure the difference between two strings with the fastest JS implementation of the Levenshtein distance algorithm - ★ 391 (Natural language processing)
- awesome-node - leven - Measure the difference between two strings using the Levenshtein distance algorithm. (Packages / Natural language processing)
- awesome-nodejs-cn - leven - 使用Levenshtein距离算法测量两个字符串之间的差异. (目录 / NLP自然语言处理)
README
# leven
> Measure the difference between two strings using the [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) algorithm
## Install
```
$ npm install leven
```## Usage
```js
import leven from 'leven';leven('cat', 'cow');
//=> 2
```## Related
- [leven-cli](https://github.com/sindresorhus/leven-cli) - CLI for this module
---
Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.