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

Function load

src/client/stdlib/sqlite.js:123–131  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

121}
122
123function load(source) {
124 return typeof source === "string"
125 ? fetch(source).then(load)
126 : source && typeof source.arrayBuffer === "function" // Response, Blob, FileAttachment
127 ? source.arrayBuffer().then(load)
128 : source instanceof ArrayBuffer
129 ? new Uint8Array(source)
130 : source;
131}
132
133async function exec(db, query, params) {
134 const [result] = await db.exec(query, params);

Callers

nothing calls this directly

Calls 1

arrayBufferMethod · 0.45

Tested by

no test coverage detected