ngh-edit-distance
v1.0.1
Published
A simple function that calculates the edit distance between two strings.
Downloads
7
Maintainers
Readme
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