Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 10, 2024 via pnpm

fast-levenshtein 3.0.0

Efficient implementation of Levenshtein algorithm with locale-specific collator support.
Package summary
Share
0
issues
1
license
2
MIT
Package created
18 Apr 2013
Version published
22 Jul 2020
Maintainers
1
Total deps
2
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
fast-levenshtein@3.0.0
fastest-levenshtein@1.0.16
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
ⓘ This is a list of fast-levenshtein 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
fastest-levenshtein1.0.165.96 kBMIT
prod

Visualizations

Frequently Asked Questions

What does fast-levenshtein do?

Fast-Levenshtein is a highly efficient JavaScript implementation of the Levenshtein algorithm. It provides locale-specific collator support and is designed to work both in node.js and in the browser. The Levenshtein algorithm is used for determining the smallest number of insertions, deletions, and substitutions required to change one string into another. Thus, Fast-Levenshtein helps developers calculate the "distance" between two strings, which is a crucial measure in many data science and natural language processing tasks. With extensive tests and high download counts, it's a reliable module for developers needing to harness the power of the Levenshtein algorithm.

How do you use fast-levenshtein?

Using Fast-Levenshtein is as simple as installing the package with a package manager like NPM and requiring it in your JavaScript code. You can install it using the command npm install fast-levenshtein. To calculate the distance between two strings, you'd use the get method, as shown below:

var levenshtein = require('fast-levenshtein');

var distance = levenshtein.get('back', 'book');   // 2
var distance = levenshtein.get('我愛你', '我叫你');   // 1

For locale-sensitive string comparisons, pass the { useCollator: true} option like this:

var levenshtein = require('fast-levenshtein');

levenshtein.get('mikailovitch', 'Mikhaïlovitch', { useCollator: true}); // 1

Please remember these steps when you plan to calculate word transformation distances in your JavaScript code using Fast-Levenshtein.

Where are the fast-levenshtein docs?

The documentation for Fast-Levenshtein, containing all instructions on how to install and use the package, as well as other useful details, is available in the README file on the package's GitHub repository. The GitHub URL for the Fast-Levenshtein repository is https://github.com/hiddentao/fast-levenshtein. Please visit the GitHub page for the most in-depth guide on using Fast-Levenshtein for your text comparison needs.