leven
Measure the difference between two strings using the fastest JS implementation of the Levenshtein distance algorithm
Last updated a year ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install leven 
SYNC missed versions from official npm registry.

leven Build Status

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

License

MIT © Sindre Sorhus

Current Tags

  • 3.1.0                                ...           latest (a year ago)

7 Versions

  • 3.1.0                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.1.0                                ...           3 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 5,314
This Week 149,506
This Month 96,080
Last Day 10,792
Last Week 124,619
Last Month 631,257
Dependencies (0)
None
Dev Dependencies (12)
Dependents (223)

Copyright 2014 - 2016 © taobao.org |