Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
levenshtein-edit-distance
Advanced tools
Readme
Levenshtein edit distance (by Vladimir Levenshtein). No cruft. Real fast.
This package is ESM only: Node 12+ is needed to use it and it must be import
ed
instead of require
d.
npm:
npm install levenshtein-edit-distance
This package exports the following identifiers: levenshteinEditDistance
.
There is no default export.
import {levenshteinEditDistance} from 'levenshtein-edit-distance'
levenshteinEditDistance('levenshtein', 'levenshtein') // => 0
levenshteinEditDistance('sitting', 'kitten') // => 3
levenshteinEditDistance('gumbo', 'gambol') // => 2
levenshteinEditDistance('saturday', 'sunday') // => 3
// Case sensitive!
levenshteinEditDistance('DwAyNE', 'DUANE') !== levenshtein('dwayne', 'DuAnE') // => true
// Insensitive
levenshteinEditDistance('DwAyNE', 'DUANE', true) === levenshtein('dwayne', 'DuAnE', true) // => true
// Order insensitive
levenshteinEditDistance('aarrgh', 'aargh') === levenshtein('aargh', 'aarrgh') // => true
Usage: levenshtein-edit-distance [options] word word
Levenshtein edit distance. No cruft. Real fast.
Options:
-h, --help output usage information
-v, --version output version number
-i, --insensitive ignore casing
Usage:
# output distance
$ levenshtein-edit-distance sitting kitten
# 3
# output distance from stdin
$ echo "saturday,sunday" | levenshtein-edit-distance
# 3
levenshtein.c
— C APIlevenshtein
— C CLIlevenshtein-rs
— Rust APIstemmer
— Porter stemming algorithmlancaster-stemmer
— Lancaster stemming algorithmdouble-metaphone
— Double Metaphone implementationsoundex-code
— Fast Soundex implementationdice-coefficient
— Sørensen–Dice coefficientsyllable
— Syllable count in an English wordFAQs
Levenshtein edit distance
We found that levenshtein-edit-distance demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
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.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).