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

Function downloadText

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

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.85

Calls 1

downloadFunction · 0.85

Tested by

no test coverage detected