(url)
| 18 | } |
| 19 | |
| 20 | async 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 | |
| 26 | async function csv(url, typed) { |
| 27 | const [contents, d3] = await Promise.all([text(url), import("npm:d3-dsv")]); |