leven
Measure the difference between two strings using the fastest JS implementation of the Levenshtein distance algorithm
Last updated 8 months 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 (8 months ago)

7 Versions

  • 3.1.0                                ...           8 months ago
  • 3.0.0                                ...           8 months ago
  • 2.1.0                                ...           3 years ago
  • 2.0.0                                ...           4 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 668
This Week 57,562
This Month 195,828
Last Day 10,332
Last Week 60,564
Last Month 234,605
Dependencies (0)
None
Dev Dependencies (12)
Dependents (154)

Copyright 2014 - 2016 © taobao.org |