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

7 Versions

  • 3.1.0                                ...           4 months ago
  • 3.0.0                                ...           4 months ago
  • 2.1.0                                ...           2 years ago
  • 2.0.0                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 12
This Week 9,452
This Month 140,730
Last Day 9,440
Last Week 45,902
Last Month 151,591
Dependencies (0)
None
Dev Dependencies (12)
Dependents (143)

Copyright 2014 - 2016 © taobao.org |