function compareSimilarity
compareSimilarity(): () => numberSort based on word similarity
Examples
Example 1
Example 1
import { compareSimilarity } from "@std/text/compare_similarity"; const words = ["hi", "hello", "help"]; // words most-similar to "hep" will be at the front words.sort(compareSimilarity("hep"));