MCPcopy Index your code
hub / github.com/zenstackhq/zenstack / getArray

Function getArray

packages/language/src/utils.ts:383–385  ·  view source on GitHub ↗
(expr: Expression | ConfigExpr | undefined)

Source from the content-addressed store, hash-verified

381}
382
383function getArray(expr: Expression | ConfigExpr | undefined) {
384 return isArrayExpr(expr) || isConfigArrayExpr(expr) ? expr.items : undefined;
385}
386
387/**
388 * Gets the value of the argument with the given name from the given attribute. Returns `undefined` if no such argument is found or if the argument value cannot be determined.

Callers 1

getLiteralArrayFunction · 0.85

Calls 2

isArrayExprFunction · 0.90
isConfigArrayExprFunction · 0.90

Tested by

no test coverage detected