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