【发布时间】:2021-07-13 07:38:01
【问题描述】:
向标准输入传递大量数据会失败。如果你在 unix 下运行这个脚本,你只会在终端中得到网站的一部分输出:
const cat = Deno.run({
cmd: ["cat"],
stdin: "piped"
});
await cat.stdin.write(new Uint8Array(
await (
await fetch("https://languagelog.ldc.upenn.edu/nll/?feed=atom")
).arrayBuffer()
));
cat.stdin.close();
await cat.status();
sample feed 以</feed> 结尾,但管道会在中间吞下:
有没有办法绕过这个问题或者我发现了一个错误?
【问题讨论】:
标签: javascript deno