JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20930577
  • Score
    100M100P100Q238310F
  • License MIT

Measure the difference between two strings using the fastest JS implementation of the Levenshtein distance algorithm

Package Exports

  • leven

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (leven) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

leven Build Status

Measure the difference between two strings
The fastest JS implementation of the Levenshtein distance algorithm

Install

$ npm install --save leven

Usage

var leven = require('leven');

leven('cat', 'cow');
//=> 2

Benchmark

$ npm run bench
         230,113 op/s » leven
         201,026 op/s » levenshtein-edit-distance
          40,454 op/s » fast-levenshtein
          28,664 op/s » levenshtein-component
          22,952 op/s » ld
          16,882 op/s » levdist
          11,180 op/s » levenshtein
           9,624 op/s » natural

CLI

$ npm install --global leven
$ leven --help

  Example
    leven cat cow
    2

License

MIT © Sindre Sorhus