node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



I use algorithm kindly provided by TheSpanishInquisition here:

All credits goes there. I have only packed it into Node module.

It provides a function that takes two string arguments and returns a hash like this:

  steps: 5,       // Levenstein demerau distance 
  relative: 0.7,  // steps / length of the longer string 
  similarity: 0.3 // 1 - relative 

Please see tests for more insights.