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

Function checkParams

src/javascript/params.ts:14–18  ·  view source on GitHub ↗
(node: Node, input: string, params: Params)

Source from the content-addressed store, hash-verified

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 {
15 for (const [name, param] of findParams(node, params, input)) {
16 param.value = params[name];
17 }
18}
19
20export function findParams(body: Node, params: Params, input: string): [name: string, node: ParamReference][] {
21 const matches: [string, ParamReference][] = [];

Callers 2

parseJavaScriptFunction · 0.85
parseProgramFunction · 0.85

Calls 1

findParamsFunction · 0.85

Tested by

no test coverage detected