Home

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