fast-levenshtein-string
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

npm version Build Status GitHub license

levenshtein-js

Implementation of the Levenshtein algorithm used to calculate distince between strings.

Installation

Install using npm:

$ npm install --save fast-levenshtein-string

Usage

var levenshtein = require('fast-levenshtein-string');
 
levenshtein.compute('niche', 'chiens'); // 5

API

compute(rawWord1: String, rawWord2: String) -> Number

Check requirements.
Returns Levensthein distance between rawWord1 and rawWord2.

Required

  • rawWord1 must be not Null
  • rawWord1 must be of type String
  • rawWord2 must be not Null
  • rawWord2 must be of type String

computeWithtoutCheck(rawWord1: String, rawWord2: String) -> Number

Does NOT check requirements.
Returns Levensthein distance between rawWord1 and rawWord2.

Required

  • rawWord1 must be not Null
  • rawWord1 must be of type String
  • rawWord2 must be not Null
  • rawWord2 must be of type String

/fast-levenshtein-string/

    Package Sidebar

    Install

    npm i fast-levenshtein-string

    Weekly Downloads

    5

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    7.17 kB

    Total Files

    5

    Last publish

    Collaborators

    • edumdum