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

Function normalizeBase

src/config.ts:412–417  ·  view source on GitHub ↗
(spec: unknown)

Source from the content-addressed store, hash-verified

410}
411
412function normalizeBase(spec: unknown): string {
413 let base = String(spec);
414 if (!base.startsWith("/")) throw new Error(`base must start with slash: ${base}`);
415 if (!base.endsWith("/")) base += "/";
416 return base;
417}
418
419function normalizeGlobalStylesheets(spec: unknown): string[] {
420 return normalizeArray(spec, String);

Callers 1

normalizeConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected