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

Function getCode

src/preview.ts:474–476  ·  view source on GitHub ↗
({code, params}: MarkdownPage, resolvers: Resolvers)

Source from the content-addressed store, hash-verified

472}
473
474function getCode({code, params}: MarkdownPage, resolvers: Resolvers): Map<string, string> {
475 return new Map(code.map((code) => [code.id, transpileCode(code, resolvers, params)]));
476}
477
478// Including the file has as a comment ensures that the code changes when a
479// directly-referenced file changes, triggering re-evaluation. Note that when a

Callers 2

watcherFunction · 0.85
helloFunction · 0.85

Calls 1

transpileCodeFunction · 0.85

Tested by

no test coverage detected