MCPcopy Create free account
hub / github.com/alibaba/open-code-review / downloadText

Function downloadText

scripts/install.js:118–126  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

116}
117
118async function downloadText(url) {
119 const res = await download(url);
120 return new Promise((resolve, reject) => {
121 let data = "";
122 res.on("data", (chunk) => (data += chunk));
123 res.on("end", () => resolve(data));
124 res.on("error", reject);
125 });
126}
127
128async function downloadBinary(url, destPath) {
129 const res = await download(url);

Callers 1

mainFunction · 0.85

Calls 1

downloadFunction · 0.85

Tested by

no test coverage detected