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

Function unwrapArray

packages/extractor/src/utils.ts:53–59  ·  view source on GitHub ↗
(array: T[])

Source from the content-addressed store, hash-verified

51}
52
53export const unwrapArray = <T>(array: T[]): T | T[] => {
54 if (array.length === 1) {
55 return array[0]!
56 }
57
58 return array
59}
60
61export const unquote = (str: string) => {
62 if (str.startsWith('"') && str.endsWith('"')) return str.slice(1, -1)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected