Package Exports
- levenshtein
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 (levenshtein) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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:
Levenshtein#valueOf()→Number- Alias of:
Levenshtein#distance.
- Alias of:
Installation
Levenshtein works in both the browser and node.js.
Browser
Simply include levenshtein.js:
<script src="/javascripts/levenshtein.js"></script>NPM
Install via npm:
npm install levenshteinOr put it in your package.json:
{ "levenshtein": "~1.0" }Bower
bower install levenshteinGit
git clone git://github.com/gf3/Levenshtein.gitLicense
Levenshtein is UNLICENSED.
Author
Written by Gianni Chiappetta – gf3.ca