</>PackageGraphPackageGraph

leven

npmv4.1.0TypeScript

Measure 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.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

10.0 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

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');
//=> 2

leven vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
leventhis page02MIT1 year ago
fastest-levenshtein01MIT1 day ago
diff124.1M4BSD-3-Clause1 day ago
fast-levenshtein03MIT1 day ago
is-glob137.4M3MIT1 day ago
camelcase95.7M2MIT1 day ago

Dependencies

Declared by leven v4.1.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (11)

ava ^3.15.0fast-levenshtein ^3.0.0ld ^0.1.0levdist ^2.2.10levenshtein ^1.0.5levenshtein-component ^0.0.1levenshtein-edit-distance ^3.0.0natural ^5.0.4talisman ^1.1.4tinybench ^4.0.1xo ^0.44.0

Used by

Popular packages that depend on leven.

Relationship graph

Dependencies (left) and dependents (right) of leven.

jest-validatefastest-levenshte…leven
leven dependencies dependents

Frequently installed together

Release history

1 release in the last two years, typically about 530 days apart.

Recent versions of leven
VersionPublishedSizeLicense
4.1.0latest1 year ago10.0 KBMIT
4.0.05 years ago5.0 KBMIT
3.1.07 years ago5.2 KBMIT
3.0.07 years ago4.9 KBMIT
2.1.09 years agoMIT
2.0.011 years agoMIT
1.0.211 years agoMIT
1.0.112 years agoMIT
1.0.012 years agoMIT

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

Keywords

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.