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

Function getArrayElementValueAtIndex

packages/extractor/src/maybe-box-node.ts:1048–1057  ·  view source on GitHub ↗
(array: ArrayLiteralExpression, index: number, stack: Node[], ctx: BoxContext)

Source from the content-addressed store, hash-verified

1046}
1047
1048const getArrayElementValueAtIndex = (array: ArrayLiteralExpression, index: number, stack: Node[], ctx: BoxContext) => {
1049 const element = array.getElements()[index]
1050 if (!element) return
1051
1052 const value = maybeBoxNode(element, stack, ctx)
1053
1054 if (isNotNullish(value)) {
1055 return value
1056 }
1057}
1058
1059const getPropertyAccessedExpressionValue = (
1060 expression: PropertyAccessExpression,

Callers 1

Calls 2

isNotNullishFunction · 0.90
maybeBoxNodeFunction · 0.85

Tested by

no test coverage detected