MCPcopy Create free account
hub / github.com/observablehq/framework / getParamName

Function getParamName

src/javascript/params.ts:9–11  ·  view source on GitHub ↗
(param: ParamReference)

Source from the content-addressed store, hash-verified

7export type ParamReference = MemberExpression & {property: Identifier | (Literal & {value: string}); value: string};
8
9function getParamName(param: ParamReference): string {
10 return param.property.type === "Identifier" ? param.property.name : param.property.value;
11}
12
13// Note: mutates node by materializing the values of the param references it contains
14export function checkParams(node: Node, input: string, params: Params): void {

Callers 1

MemberExpressionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected