MCPcopy
hub / github.com/tailwindlabs/tailwindcss / bareValues

Function bareValues

packages/tailwindcss/src/compat/default-theme.ts:7–14  ·  view source on GitHub ↗
(fn: (value: NamedUtilityValue) => string | undefined)

Source from the content-addressed store, hash-verified

5import type { UserConfig } from './config/types'
6
7function bareValues(fn: (value: NamedUtilityValue) => string | undefined) {
8 return {
9 // Ideally this would be a Symbol but some of the ecosystem assumes object with
10 // string / number keys for example by using `Object.entries()` which means that
11 // the function that handles the bare value would be lost
12 __BARE_VALUE__: fn,
13 }
14}
15
16let bareIntegers = bareValues((value) => {
17 if (isPositiveInteger(value.value)) {

Callers 1

default-theme.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected