@velocitycareerlabs/string-matching

1.22.0 • 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

650

Version

1.22.0

License

Apache-2.0

Unpacked Size

15.1 kB

Total Files

7

Last publish

Collaborators

  • velocitycareerlabs