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

Function normalizeScripts

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

Source from the content-addressed store, hash-verified

425}
426
427function normalizeScripts(spec: unknown): Script[] {
428 console.warn(`${yellow("Warning:")} the ${bold("scripts")} option is deprecated; use ${bold("head")} instead.`);
429 return normalizeArray(spec, normalizeScript);
430}
431
432function normalizeScript(spec: unknown): Script {
433 const script = typeof spec === "string" ? {src: spec} : (spec as ScriptSpec);

Callers 1

normalizeConfigFunction · 0.85

Calls 2

normalizeArrayFunction · 0.85
warnMethod · 0.45

Tested by

no test coverage detected