leven
npmv4.1.0TypeScriptMeasure the difference between two strings using the Levenshtein distance algorithm
Safe to adopt
Yes — leven scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 363 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- BMaintenance: grade B, Good.
Last published 363 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 10.0 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding leven to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node ^12.20.0 || ^14.13.1 || >=16.0.0
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the leven README.
import leven from 'leven';
leven('cat', 'cow');
//=> 2leven vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| leventhis page | 0 | 2 | MIT | 1 year ago |
| fastest-levenshtein | 0 | 1 | MIT | 1 day ago |
| diff | 124.1M | 4 | BSD-3-Clause | 1 day ago |
| fast-levenshtein | 0 | 3 | MIT | 1 day ago |
| is-glob | 137.4M | 3 | MIT | 1 day ago |
| camelcase | 95.7M | 2 | MIT | 1 day ago |
Dependencies
Declared by leven v4.1.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (11)
Used by
Popular packages that depend on leven.
Generic configuration validation tool that helps you with warnings, errors and deprecation messages as well as showing users examples of correct configuration.
Fastest Levenshtein distance implementation in JS.
Relationship graph
Dependencies (left) and dependents (right) of leven.
Frequently installed together
Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`
TypeScript definitions for yargs
A utility function to get the type of a value
This package contains shared types of Jest's packages.
Stringify any JavaScript value.
An AST-based pattern checker for JavaScript.
Prettier is an opinionated code formatter
Delightful JavaScript Testing.
Efficient implementation of Levenshtein algorithm with locale-specific collator support.
Release history
1 release in the last two years, typically about 530 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 4.1.0latest | 1 year ago | 10.0 KB | MIT |
| 4.0.0 | 5 years ago | 5.0 KB | MIT |
| 3.1.0 | 7 years ago | 5.2 KB | MIT |
| 3.0.0 | 7 years ago | 4.9 KB | MIT |
| 2.1.0 | 9 years ago | — | MIT |
| 2.0.0 | 11 years ago | — | MIT |
| 1.0.2 | 11 years ago | — | MIT |
| 1.0.1 | 12 years ago | — | MIT |
| 1.0.0 | 12 years ago | — | MIT |
Overview
leven is an npm package that measure the difference between two strings using the Levenshtein distance algorithm. It has 2 known dependents in the graph. The latest version is 4.1.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need measure the difference between two strings using the Levenshtein distance algorithm and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use leven?
Yes — leven scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 363 days ago.
How do I install leven?
Run `npm install leven` to add leven to your npm project.
What license is leven released under?
leven is distributed under the MIT license.
How popular is leven?
npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on leven.
Is leven still maintained?
The most recent release of leven (v4.1.0) was published 1 year ago.
Does leven run install scripts?
No. leven does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.