Home

tailwind-ctp-intellisense @6cbd49a74a8b95aec2b02c41417506b50fed62d4 - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tailwind-ctp-intellisense / src / lsp / util / closest.ts
- raw
1
2
3
4
5
6
7
import levenshtein from 'js-levenshtein'

export function closest(input: string, options: string[]): string | undefined {
  return options.sort(
    (a, b) => levenshtein(input, a) - levenshtein(input, b)
  )[0]
}