index.d.ts 322 B

123456789101112131415
  1. declare module "levenary" {
  2. /**
  3. Return the string within `array`, whose Levenshtein distance from `str` is minimal.
  4. @example
  5. ```
  6. import levenary from 'levenary';
  7. levenary('cat', ['cow', 'dog', 'pig']);
  8. //=> 'cow'
  9. ```
  10. */
  11. const levenary: (str: string, array: string[]) => string;
  12. export default levenary;
  13. }