Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

damerau-levenshtein

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Issues
File Explorer

Advanced tools

damerau-levenshtein

Damerau - Levenshtein distance by The Spanish Inquisition + relative distance

    1.0.8latest

Version published
Maintainers
1
Weekly downloads
9,605,184
decreased by-13.22%

Weekly downloads

Changelog

Source

[1.0.8] - 2021-12-20

Security:

  • Upgrade mocha to > 9.0.0 (fixes three security vulnerabilities brought by transitive dependencies)

Readme

Source

NPM

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 }

Install

npm install damerau-levenshtein

Use with ES6 modules

import * as levenshtein from 'damerau-levenshtein'; const lev = levenshtein('hello world', 'Hello World!'); // { steps: 4, relative: 0.3076923076923077, similarity: 0.6923076923076923 }

Please see tests for more insights.

Use with TypeScript

import * as levenshtein from 'damerau-levenshtein'; interface LevenshteinResponse { steps: number; relative: number; similarity: number; } const lev: LevenshteinResponse = levenshtein('hello world', 'Hello World!'); console.log(lev.steps); // 2 console.log(lev.foo); // TypeScript Error: Property 'foo' does not exist on type 'LevenshteinResponse'.

Keywords

FAQs

What is damerau-levenshtein?

Damerau - Levenshtein distance by The Spanish Inquisition + relative distance

Is damerau-levenshtein popular?

The npm package damerau-levenshtein receives a total of 7,748,231 weekly downloads. As such, damerau-levenshtein popularity was classified as popular.

Is damerau-levenshtein well maintained?

We found that damerau-levenshtein demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 06 Jan 2022

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc