You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
345 B
16 lines
345 B
4 years ago
|
declare module "levenary" {
|
||
|
/**
|
||
|
Return the string within `array`, whose Levenshtein distance from `str` is minimal.
|
||
|
|
||
|
@example
|
||
|
```
|
||
|
import levenary from 'levenary';
|
||
|
|
||
|
levenary('cat', ['cow', 'dog', 'pig']);
|
||
|
//=> 'cow'
|
||
|
```
|
||
|
*/
|
||
|
declare function levenary (str: string, array: string[]): string;
|
||
|
declare export default typeof levenary;
|
||
|
}
|