MCPcopy Create free account
hub / github.com/fontsource/fontsource / writeDownload

Function writeDownload

packages/cli/src/google/download.ts:20–23  ·  view source on GitHub ↗
(url: string, dest: fs.PathLike)

Source from the content-addressed store, hash-verified

18} from '../utils';
19
20const writeDownload = async (url: string, dest: fs.PathLike) => {
21 const res = await fetch(url);
22 await fs.writeFile(dest, Buffer.from(await res.arrayBuffer()));
23};
24
25interface StaticVariant {
26 kind: 'static';

Callers 1

downloadFunction · 0.85

Calls 2

arrayBufferMethod · 0.80
fetchFunction · 0.50

Tested by

no test coverage detected