UNPKG
closest-match
Version:
latest (1.3.3)
1.3.3
1.3.0
Uses Levenshtein Distance to find the closest string match or matches in an array
closest-match
/
lib
/
index.d.ts
3 lines
(2 loc)
•
190 B
TypeScript
View Raw
1
2
3
export
declare
const
distance
:
(
a
:
string
,
b
:
string
) =>
number
;
export
declare
const
closestMatch
:
(
target
:
string
,
array
:
string
[],
showOccurrences
?:
boolean
) =>
string
|
string
[] |
null
;