Home

tailwind-ctp-intellisense @8c0c777c656a5daa067920f64bfa5f11698d0c49 - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tailwind-ctp-intellisense / packages / tailwindcss-language-service / src / util / flagEnabled.ts
- raw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
import { State } from './state'
const dlv = require('dlv')

export function flagEnabled(state: State, flag: string) {
  if (state.featureFlags.future.includes(flag)) {
    return (
      state.config.future === 'all' ||
      dlv(state.config, ['future', flag], false)
    )
  }

  if (state.featureFlags.experimental.includes(flag)) {
    return (
      state.config.experimental === 'all' ||
      dlv(state.config, ['experimental', flag], false)
    )
  }

  return false
}