(url)
| 1 | /** Download a url to a string */ |
| 2 | export async function download(url) { |
| 3 | try { |
| 4 | return await fetch(url).then(res => res.text()); |
| 5 | } catch (e) { |
| 6 | // eslint-disable-next-line no-console |
| 7 | console.error('Failed to download', url, e); |
| 8 | process.exit(1); |
| 9 | } |
| 10 | } |
no test coverage detected