leven (3.1.0)
Published 2026-02-24 14:00:48 +00:00 by atheaadmin
Installation
registry=npm install leven@3.1.0"leven": "3.1.0"About this package
leven 
Measure the difference between two strings
One of the fastest JS implementations of the Levenshtein distance algorithm
Install
$ npm install leven
Usage
const leven = require('leven');
leven('cat', 'cow');
//=> 2
Benchmark
$ npm run bench
165,926 op/s » leven
164,398 op/s » talisman
1,044 op/s » levenshtein-edit-distance
628 op/s » fast-levenshtein
497 op/s » levenshtein-component
195 op/s » ld
190 op/s » levenshtein
168 op/s » levdist
10 op/s » natural
Related
- leven-cli - CLI for this module
License
MIT © Sindre Sorhus
Dependencies
Development Dependencies
| ID | Version |
|---|---|
| ava | ^1.4.1 |
| fast-levenshtein | ^2.0.6 |
| ld | ^0.1.0 |
| levdist | ^2.2.9 |
| levenshtein | ^1.0.5 |
| levenshtein-component | ^0.0.1 |
| levenshtein-edit-distance | ^2.0.3 |
| matcha | ^0.7.0 |
| natural | ^0.6.3 |
| talisman | ^0.21.0 |
| tsd | ^0.7.2 |
| xo | ^0.24.0 |
Keywords
leven
levenshtein
distance
algorithm
algo
string
difference
diff
fast
fuzzy
similar
similarity
compare
comparison
edit
text
match
matching