$ npm install levenshtein-distance
The Levenshtein distance is a string metric for measuring the difference between two sequences.
var ld = require("levenshtein-distance");
var leven = new ld(['hit','lead','left']);
leven.find('hid',function(result){
console.log(result); // => hit
});
nodejs-levenshtein-distance is licensed under the BSD license.