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

Function config

packages/tailwindcss/src/compat/plugin-api.ts:530–546  ·  view source on GitHub ↗
(path, defaultValue)

Source from the content-addressed store, hash-verified

528 },
529
530 config(path, defaultValue) {
531 let obj: Record<any, any> = resolvedConfig
532
533 if (!path) return obj
534
535 let keypath = toKeyPath(path)
536
537 for (let i = 0; i < keypath.length; ++i) {
538 let key = keypath[i]
539
540 if (obj[key] === undefined) return defaultValue
541
542 obj = obj[key]
543 }
544
545 return obj ?? defaultValue
546 },
547 }
548
549 // Bind these functions so they can use `this`

Callers 2

loadModuleFunction · 0.70
darkModePluginFunction · 0.70

Calls 1

toKeyPathFunction · 0.90

Tested by 1

loadModuleFunction · 0.56