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

Function isPrimitiveType

packages/extractor/src/utils.ts:15–18  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

13export const isArray = (value: any): value is any[] => Array.isArray(value)
14
15export const isPrimitiveType = (value: unknown): value is PrimitiveType => {
16 const type = typeof value
17 return type === 'string' || type === 'number' || type === 'boolean' || value === null || value === undefined
18}
19
20/** Returns true if value extends basic Object prototype and is not a Date */
21export const isObjectLiteral = <T>(value: any): value is T extends unknown ? Record<string, any> : T =>

Callers 1

toBoxNodeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected