Levenshtein
Levenshtein string difference in Javascript.
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.
- m (
Levenshtein#distance
→Number
- Distance between strings.
Levenshtein#inspect()
→String
- Pretty print Levenshtein table.
Levenshtein#toString()
→String
- Alias of:
Levenshtein#inspect
.
- Alias of:
Installation
With npm:
npm install levenshtein
With git:
git clone git://github.com/gf3/Levenshtein.git
License
Levenshtein is UNLICENSED.
Author
Written by Gianni Chiappetta – gf3.ca