# levenshtein

> Javascript implementation of the L-diggity.

Latest version **1.0.5** (published 2014-09-23) · Public Domain license · 0 weekly downloads

## Install

```sh
npm install levenshtein
pnpm add levenshtein
yarn add levenshtein
bun add levenshtein
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2014-09-23 |
| First published | 2012-01-29 |
| Weekly downloads | 0 |
| License | Public Domain |
| TypeScript types | separate (@types/levenshtein) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 283 |
| Author | Gianni Chiappetta |
| Maintainers | gf3 |

## Links

- npm: https://www.npmjs.com/package/levenshtein
- Repository: http://github.com/gf3/Levenshtein
- Homepage: https://github.com/gf3/Levenshtein
- Issues: https://github.com/gf3/Levenshtein/issues
- npm.io page: https://npm.io/package/levenshtein

## Recent versions

- 1.0.5 (latest) — 2014-09-23
- 1.0.4 — 2014-02-03
- 1.0.2 — 2013-07-15
- 1.0.0 — 2012-01-29
- 1.0.1 — 2012-01-29

## README

# Levenshtein

[Levenshtein][wikipedia] string difference in Javascript.

![Screenshot][screenshot]

`Levenshtein` also does some neat things like coerce to a number and string
approproately. So you can compare Levenshtein objects directly! Not to mention
it has specs!


## API

* `new Levenshtein( m, n )` → `Levenshtein`
    * m ( `String` ): First string.
    * n ( `String` ): Second string.
    * Initialise a new Levenshtein object.

* `Levenshtein#distance` → `Number`
    * Distance between strings.

* `Levenshtein#inspect()` → `String`
    * Pretty print Levenshtein table.

* `Levenshtein#toString()` → `String`
    * Alias of: `Levenshtein#inspect()`.

* `Levenshtein#valueOf()` → `Number`
    * Alias of: `Levenshtein#distance`.


## Installation

Levenshtein works in both the browser and [node.js][node].


### Browser

Simply include `levenshtein.js`:

``` html
<script src="/javascripts/levenshtein.js"></script>
```


### NPM

Install via npm:

``` sh
npm install levenshtein
```

Or put it in your `package.json`:

``` json
{ "levenshtein": "~1.0" }
```


### Bower

``` sh
bower install levenshtein
```


### Git

``` sh
git clone git://github.com/gf3/Levenshtein.git
```


## License

Levenshtein is [UNLICENSED][unlicense].


## Author

Written by [Gianni Chiappetta][github] &ndash; [gf3.ca][gf3]

[gf3]: http://gf3.ca
[github]: https://github.com/gf3
[node]: http://nodejs.org/
[screenshot]: http://f.cl.ly/items/3g1m0u401j0m2H2k0s2X/levenshtein.PNG
[unlicense]: http://unlicense.org/
[wikipedia]: http://en.wikipedia.org/wiki/Levenshtein_distance

---
_Source: https://npm.io/package/levenshtein · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
