1.0.1 • Published 2 years ago

ngh-edit-distance v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Ngh-Edit-Distance

A simple function that calculates the edit distance distance between two strings.

Installation

npm i ngh-edit-distance 

Basic usage

const editDistance = require('ngh-edit-distance');

let  str = "horse";
let str2 = "ros";

console.log(editDistance(str, str2)) //3

Show matrix

Displays on console the Levenshtein distance algorithm matrix

const editDistance = require('ngh-edit-distance');

let  str = "horse";
let str2 = "ros";

console.log(editDistance(str, str2, true)) //3