Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/proc/legacy/deps.ts>readAll

A better way to work with processes in Deno.
Latest
function readAll
import { readAll } from "https://deno.land/x/proc@0.21.9/legacy/deps.ts";

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

Examples

Example 1

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

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

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

Returns

Promise<Uint8Array>