Sha256: 325accaf58c719f5d7aaf8bcc8298a22721ae7bb65a12f0848e5f66e569f9be8

Contents?: true

Size: 949 Bytes

Versions: 11

Compression:

Stored size: 949 Bytes

Contents

# leven [![Build Status](https://travis-ci.org/sindresorhus/leven.svg?branch=master)](https://travis-ci.org/sindresorhus/leven)

> Measure the difference between two strings  
> The fastest JS implementation of the [Levenshtein distance](http://en.wikipedia.org/wiki/Levenshtein_distance) algorithm


## Install

```
$ npm install --save leven
```


## Usage

```js
var leven = require('leven');

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


## Benchmark

```
$ npm run bench
```
```
         343,757 op/s » leven
         264,625 op/s » levenshtein-edit-distance
          49,981 op/s » fast-levenshtein
          25,496 op/s » levenshtein-component
          18,240 op/s » levdist
          17,554 op/s » ld
          12,633 op/s » natural
           9,960 op/s » levenshtein
```


## CLI

```
$ npm install --global leven
```

```
$ leven --help

  Example
    $ leven cat cow
    2
```


## License

MIT © [Sindre Sorhus](http://sindresorhus.com)

Version data entries

11 entries across 11 versions & 4 rubygems

Version Path
ilog-0.4.1 node_modules/leven/readme.md
ilog-0.4.0 node_modules/leven/readme.md
ilog-0.3.3 node_modules/leven/readme.md
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/leven/readme.md
xcodebuild-helper-1.2.3 externals/ios-sim-master/node_modules/leven/readme.md
es6_tilt-0.1.2 test/dummy/app/assets/javascripts/node_modules/leven/readme.md
es6_tilt-0.1.1 test/dummy/app/assets/javascripts/node_modules/leven/readme.md
es6_tilt-0.1.0 test/dummy/app/assets/javascripts/node_modules/leven/readme.md
gulp_assets-1.0.0.pre.5 template/node_modules/babel-core/node_modules/leven/readme.md
gulp_assets-1.0.0.pre.4 template/node_modules/babel-core/node_modules/leven/readme.md
gulp_assets-1.0.0.pre.3 template/node_modules/babel-core/node_modules/leven/readme.md