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

Function text

src/client/stdlib/sampleDatasets.js:20–24  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

18}
19
20async function text(url) {
21 const response = await fetch(url);
22 if (!response.ok) throw new Error(`unable to fetch ${url}: status ${response.status}`);
23 return response.text();
24}
25
26async function csv(url, typed) {
27 const [contents, d3] = await Promise.all([text(url), import("npm:d3-dsv")]);

Callers 1

csvFunction · 0.70

Calls 1

textMethod · 0.45

Tested by

no test coverage detected