Deno.stdin
Ссылка на stdin, которая может быть использована для прямого чтения из stdin. Она реализует специфичные для Deno интерфейсы Reader, ReaderSync и Closer, а также предоставляет интерфейс ReadableStream.
Чтение блоков из потока чтения
const decoder = new TextDecoder();
for await (const chunk of Deno.stdin.readable) {
const text = decoder.decode(chunk);
// do something with the text
}
const stdin:& Reader& Closer& {readonly rid: number;readonly readable: ReadableStream<Uint8Array>;setRaw(mode: boolean, options?: SetRawOptions): void;};
© 2018–2022 the Deno authors
https://doc.deno.land/deno/stable/~/Deno.stdin