Module

x/dax/src/deps.ts>readAll

Cross-platform shell tools for Deno and Node.js inspired by zx.
Very Popular
Latest
function readAll
import { readAll } from "https://dotland.deno.dev/x/dax@0.39.2/src/deps.ts";

Read {@link Reader} r until EOF (null) and resolve to the content as {@link Uint8Array}.

Examples

Example 1

import { readAll } from "https://deno.land/std@$STD_VERSION/io/read_all.ts";

// Example from stdin
const stdinContent = await readAll(Deno.stdin);

// Example from file
using file = await Deno.open("my_file.txt", {read: true});
const myFileContent = await readAll(file);

Parameters

reader: Reader

Returns

Promise<Uint8Array>