@velocitycareerlabs/string-matching

1.21.1 • Public • Published

Levenshtein Distance package

Finds the closest suggestion using shortest Levenshtein Distance from fastest-levenshtein npm package

Exposes 'getClosest' function which takes two parameters, the inputted incorrect string, and an array of correct possibilities.

Example

add "@velocitycareerlabs/string-matching": "0.5.0-build" to package.json

const { getClosest } = require('@velocitycareerlabs/string-matching');

const closestLevenshteinDistance = await getClosest('fast', ['slow', 'faster', 'fastest']);

Returns

faster

Readme

Keywords

none

Package Sidebar

Install

npm i @velocitycareerlabs/string-matching

Weekly Downloads

1,075

Version

1.21.1

License

Apache-2.0

Unpacked Size

15.2 kB

Total Files

7

Last publish

Collaborators

  • velocitycareerlabs