MCPcopy Create free account
hub / github.com/chakra-ui/panda / compact

Function compact

packages/shared/src/compact.ts:1–3  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

1export function compact<T extends Record<string, any>>(value: T) {
2 return Object.fromEntries(Object.entries(value ?? {}).filter(([_, value]) => value !== undefined)) as T
3}

Callers 9

registerTokensMethod · 0.90
generateThemesFunction · 0.90
generatePatternFunction · 0.90
processPatternFunction · 0.90
ContextClass · 0.90
UtilityClass · 0.90
mainFunction · 0.90
compactStylesFunction · 0.90
getPatternStylesFunction · 0.90

Calls 2

filterMethod · 0.80
entriesMethod · 0.80

Tested by

no test coverage detected