Skip to content

pabloneighbour/Ngh-Edit-Distance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published