Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-levenshtein

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-levenshtein

Fastest Levenshtein distance implementation.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
37
decreased by-77.98%
Maintainers
1
Weekly downloads
 
Created
Source

node-levenshtein :rocket:

Fastest implementation of the Levenshtein distance algorithm - (approx. 60+ percent faster than the 2nd fastest implementation). This algorithm can be used to measure the similarity of two strings.

Install

$ npm install node-levenshtein --save

Usage

var levenshtein = require('node-levenshtein')

console.log(levenshtein('lorem', 'ipsum'))
//=> 4

Benchmark

Benchmark

1,000 words
---
6,152 ops/sec -> node-levenshtein
4,373 ops/sec -> js-levenshtein
4,108 ops/sec -> leven 
4,735 ops/sec -> levenshtein-Edit-Distance 
2,208 ops/sec -> fast-levenshtein 

100 Sentences
---
2,840 ops/sec -> node-levenshtein
1,764 ops/sec -> js-levenshtein 
1,082 ops/sec -> leven        
1,009 ops/sec -> levenshtein-Edit-Distance
  273 ops/sec -> fast-levenshtein

10 paragraphs
---
  267 ops/sec -> node-levenshtein
  164 ops/sec -> js-levenshtein 
   95 ops/sec -> leven 
   90 ops/sec -> levenshtein-Edit-Distance
   21 ops/sec -> fast-levenshtein 

Keywords

FAQs

Package last updated on 27 Nov 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc