![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | LICENSE | 2 years ago | 1.1K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | README.md | 2 years ago | 1.0K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | index.d.ts | 2 years ago | 322 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | index.flow.js | 2 years ago | 345 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | index.js | 2 years ago | 605 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | index.mjs | 2 years ago | 321 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | package.json | 2 years ago | 2.4K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
Given a string, A and an array of strings XS, return the string X from XS whose Levenshtein distance from A is minimal.
$ npm install levenary
import levenary from 'levenary';
levenary('cat', ['cow', 'dog', 'pig']);
//=> 'cow'
levenary
?$ npm run bench
311,915 op/s » levenary
74,030 op/s » didyoumean
141,423 op/s » didyoumean2