katoikia-app/web-ui/web-react/node_modules/levenary/index.d.ts

16 lines
322 B
TypeScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
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'
```
*/
const levenary: (str: string, array: string[]) => string;
export default levenary;
}