function closestString
closestString(): stringget most-similar word
Examples
Example 1
Example 1
import { closestString } from "@std/text/closest_string"; const possibleWords: string[] = ["length", "size", "blah", "help"]; // case-insensitive by default const word = closestString("hep", possibleWords);
Parameters
Return Type
A sorted copy of possibleWords