3.0.0 • Published 5 years ago

fast-levenshtein v3.0.0

Weekly downloads
17,280,621
License
MIT
Repository
github
Last release
5 years ago

fast-levenshtein - Levenshtein algorithm in Javascript

Build Status NPM module NPM downloads Follow on Twitter

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-levenshtein

CDN

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('我愛你', '我叫你');   // 1

Locale-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});
// 1

Building and Testing

To build the code and run the tests:

$ npm install -g grunt-cli
$ npm install
$ npm run build

Performance

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

optionatorreact-hot-loaderundertaker@huyhpham/rn-linearchetype-library@case-app/angular-library@casejs/angular-libraryeasy-select-rnreact-native-bluetooth2killi8n-react-native-fast-imagepipihomespecify-importsbabel-specify-imports@icanpm/api-masterreaperlog@arisageha/react-lazyload@arisageha/react-lazyload-fix@oneplanetcrowd/developers@almeidaa/msmultisig-serverreact-native-template-rfbaseairscanairscan-exampleverdant-logbb-chatreact-native-esc-pos-sahaab@borisovart/atol-kkt-moduledeneme323112@texttree/demo-bsa-reference-rcl@secman/desktop-api@fundefund/funde_ck@ntt_app/react-native-custom-notificationcovid-pk-vaccination-centres-parserreact-native-covid-sdkgql_din_modphinternal-apimutasi-bca@jttechnic/interpreter@saeon/quick-formcthpb-plugin-socialnocodb1@iobroker-community-adapters/iobroker.device-watcher@blinkz/react-hot-loader@olivervorasai/slidermysql-formatreact-native-printer-brothers@belko.tech/belko-multi-wallet-sdk@newhorizon-tech/dd-npm-package-templatereact-native-shekhar-bridge-testcogoportutilsukor-remasteruncoded-connect@reversodev/oceanic-fleetwilscanner@khalitovadel/abstract-repository@oiti/documentoscopy-react-native@respondea/cordova-plugin-v-inappbrowserstretch-rollup@mink-opn/build-tokensquoc-testreact-native-slider-kfsvelte-slime@infinitebrahmanuniverse/nolb-fast-@saaspe/componentspack1111llplginexpand-react-bridgelllocccca2233lllocccca2233xlllocccca2233x1opea-bootstraapnocodb-dailyluminos-ui-coresklif-ui-kitsklif-apits-handy@everything-registry/sub-chunk-1649jawwy-sdkjawwy_gamification_release@explodingcamera/react-hot-loaderassistant-source@deepakorg/test@deepak757/testreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgp149-tablesklif-uimachinebeemrcapsreact-native-jawwy_samplegriffin-ui-libraryjualwkakokowawkzl2kzl3kzl4kzl5mamaow
3.0.0

5 years ago

2.0.6

8 years ago

2.0.5

8 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.1.4

9 years ago

1.1.3

9 years ago

1.1.2

9 years ago

1.1.0

9 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

11 years ago

1.0.3

11 years ago

1.0.2

11 years ago

1.0.1

11 years ago

1.0.0

12 years ago