levenary

WebJar for levenary

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

levenary
Last Version

Last Version

1.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

levenary
WebJar for levenary
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/tanhauhau/levenary

Download levenary

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/levenary/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>levenary</artifactId>
    <version>1.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/levenary/
implementation 'org.webjars.npm:levenary:1.1.1'
// https://jarcasting.com/artifacts/org.webjars.npm/levenary/
implementation ("org.webjars.npm:levenary:1.1.1")
'org.webjars.npm:levenary:jar:1.1.1'
<dependency org="org.webjars.npm" name="levenary" rev="1.1.1">
  <artifact name="levenary" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='levenary', version='1.1.1')
)
libraryDependencies += "org.webjars.npm" % "levenary" % "1.1.1"
[org.webjars.npm/levenary "1.1.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : leven jar [3.1.0,4)

Project Modules

There are no modules declared in this project.

levenary

npm-version github-actions

Given a string, A and an array of strings XS, return the string X from XS whose Levenshtein distance from A is minimal.

Install

$ npm install levenary

Usage

import levenary from 'levenary';

levenary('cat', ['cow', 'dog', 'pig']);
//=> 'cow'

Why levenary?

  1. Based on leven, the fastest JS implementation of the Levenshtein distance algorithm
  2. Only 1 API. Simple and clean. If you want more, please use didyoumean2.
  3. Flow and TypeScript support.

Benchmark

$ npm run bench
  311,915 op/s » levenary
   74,030 op/s » didyoumean
  141,423 op/s » didyoumean2

Versions

Version
1.1.1
1.1.0