Home

tailwind-ctp-intellisense @05b0f74f7e41835eed582e54f2e4dc10b6ae1211 - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tailwind-ctp-intellisense / packages / tailwindcss-language-service / src / util / combinations.ts
- raw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
export function combinations(str: string): string[] {
  let fn = function (active: string, rest: string, a: string[]) {
    if (!active && !rest) return undefined
    if (!rest) {
      a.push(active)
    } else {
      fn(active + rest[0], rest.slice(1), a)
      fn(active, rest.slice(1), a)
    }
    return a
  }
  return fn('', str, [])
}