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
7.44 kB
Created
Weekly downloads
 

Changelog

Source

[1.0.1] - 2016-09-12

Fixed:

  • Wrong results for transposition #2 by @g-adolph

Added:

  • First unit test by @g-adolph
  • A Change Log :) by @tad-lispy

Readme

Source

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 bigger of two words
  similarity: 0.3 // 1 - relative
}

Keywords

FAQs

Last updated on 11 Sep 2016

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