Socket
Socket
Sign inDemoInstall

damerau-levenshtein

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    damerau-levenshtein

Damerau - Levenshtein distance by The Spanish Inquisition + relative distance


Version published
Weekly downloads
12M
decreased by-8.6%
Maintainers
1
Install size
9.84 kB
Created
Weekly downloads
 

Changelog

Source

[1.0.4] - 2017-03-24

Fixed:

  • Fails in strict mode #7 by @gilly3

Readme

Source

NPM

I use algorithm kindly provided by TheSpanishInquisition here: http://jsperf.com/damerau-levenshtein-distance.

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.

Keywords

FAQs

Last updated on 24 Mar 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc