node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey ยป


What's Distance?

Distance is a Coffeescript and Javascript module for calculating distances between strings.

var distance = require "distance"
console.log(distance.sift3("banana", "fanana"))
console.log(distance.levenshtein("banana", "fanana"))

The distance string metrics currently supported are:

Levenshtein - For accuracy

Sift3 - For speed

To our knowledge, the implementations are the fastest variations available.


The recommended way is through the excellent npm:

$ npm install distance

Otherwise, you can check it in your repository and then expose it:

$ git clone git:// node_modules/distance/

Distance is UNLICENSED.