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

js-levenshtein

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-levenshtein

An efficient JS implementation calculating the Levenshtein distance, i.e. the difference between two strings.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.5M
increased by4.33%
Maintainers
1
Weekly downloads
 
Created

What is js-levenshtein?

The js-levenshtein npm package is used to calculate the Levenshtein distance between two strings. The Levenshtein distance is a measure of the difference between two sequences, which is the minimum number of single-character edits (insertions, deletions, or substitutions) required to change one word into the other.

What are js-levenshtein's main functionalities?

Calculate Levenshtein distance

This feature allows you to calculate the Levenshtein distance between two strings. In the code sample, the distance between 'kitten' and 'sitting' is calculated, which is 3.

const levenshtein = require('js-levenshtein');
let distance = levenshtein('kitten', 'sitting');
console.log(distance); // Output: 3

Other packages similar to js-levenshtein

Keywords

FAQs

Package last updated on 14 May 2017

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