Package Exports
- fast-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 (fast-levenshtein) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
fast-levenshtein - Levenshtein algorithm in Javascript
A Javascript implementation of the Levenshtein algorithm with locale-specific collator support. This uses fastest-levenshtein under the hood.
Features
- Works in node.js and in the browser.
- Locale-sensitive string comparisons if needed.
- Comprehensive test suite.
Installation
$ npm install fast-levenshteinCDN
The latest version is now also always available at https://npm-cdn.com/pkg/fast-levenshtein/
Examples
Default usage
var levenshtein = require('fast-levenshtein');
var distance = levenshtein.get('back', 'book'); // 2
var distance = levenshtein.get('我愛你', '我叫你'); // 1Locale-sensitive string comparisons
It supports using Intl.Collator for locale-sensitive string comparisons:
var levenshtein = require('fast-levenshtein');
levenshtein.get('mikailovitch', 'Mikhaïlovitch', { useCollator: true});
// 1Building and Testing
To build the code and run the tests:
$ npm install -g grunt-cli
$ npm install
$ npm run buildPerformance
This uses fastest-levenshtein under the hood.
Contributing
If you wish to submit a pull request please update and/or create new tests for any changes you make and ensure the grunt build passes.
See CONTRIBUTING.md for details.
License
MIT - see LICENSE.md

