Home

tailwind-ctp-intellisense @d76119cab1142259c88f5be0f59172da660bd4bd - 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]
}