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

Function mockResolveImport

test/javascript/transpile-test.ts:18–22  ·  view source on GitHub ↗
(specifier: string)

Source from the content-addressed store, hash-verified

16}
17
18function mockResolveImport(specifier: string): string {
19 return isPathImport(specifier)
20 ? `./${join("_import", specifier)}`
21 : specifier.replace(/^npm:/, "https://cdn.jsdelivr.net/npm/");
22}
23
24function mockResolveFile(specifier: string): string {
25 return isPathImport(specifier)

Callers

nothing calls this directly

Calls 1

isPathImportFunction · 0.85

Tested by

no test coverage detected