3.0.0 • Published 4 years ago

fast-levenshtein v3.0.0

Weekly downloads
17,280,621
License
MIT
Repository
github
Last release
4 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

optionatorundertakerreact-hot-loader@huyhpham/rn-linearchetype-librarybalena-cli@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_modbitgetphinternal-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@314oner_npm/universal-components-library@deepakorg/test@deepak757/testreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgp149-tablesklif-uimachinebeemrcapsreact-native-jawwy_sample@ifanshx/cycgods@ikon-x/ckeditor5-custom-build-for-irrosoft@idas1/ui-component-lib@ibrahimcesar/middy-idempotent@innoswap/core
3.0.0

4 years ago

2.0.6

7 years ago

2.0.5

8 years ago

2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.0

8 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

11 years ago