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

Function normalizeArray

src/config.ts:408–410  ·  view source on GitHub ↗
(spec: unknown, f: (spec: unknown) => T)

Source from the content-addressed store, hash-verified

406}
407
408function normalizeArray<T>(spec: unknown, f: (spec: unknown) => T): T[] {
409 return spec == null ? [] : Array.from(spec as ArrayLike<unknown>, f);
410}
411
412function normalizeBase(spec: unknown): string {
413 let base = String(spec);

Callers 6

normalizeThemeFunction · 0.85
normalizeScriptsFunction · 0.85
normalizePagesFunction · 0.85
normalizeSectionFunction · 0.85
normalizeInterpretersFunction · 0.85

Calls 1

fromMethod · 0.80

Tested by

no test coverage detected