readAll
import { readAll } from "jsr:@ende/io";function
async function readAll(reader: Reader): Promise<Uint8Array>Read Reader r until EOF (null) and resolve to the content as
Uint8Array.
reader: ReaderThe reader to read from
Returns
The content as Uint8Array
Example: Usage
import { readAll } from "@ende/io/read-all";
// Example from stdin
const stdinContent = await readAll(Ende.stdin);
// Example from file
using file = await Ende.open("my_file.txt", {read: true});
const myFileContent = await readAll(file);