Compute the Levenshtein distance for string comparison
ld is a Node.js package for computing the Levenshtein distance between 2 strings.
npm install ld
You can run the extremely simple test case by executing node test/test.js STR1 STR2 or use the code below to do the same.
node test/test.js STR1 STR2
var ld = require('ld');console.log(ld.computeDistance(process.argv, process.argv));
Of course you’re getting around to it, but you probably should get around to it soon. Buy a ticket »
how? learn more