Skip to main content
Module

std/encoding/mod.ts>getNBytes

Deno standard library
Go to Latest
function getNBytes
import { getNBytes } from "https://deno.land/std@0.36.0/encoding/mod.ts";

Reads n bytes from r.

Returns it in a Uint8Array, or throws UnexpectedEOFError if n bytes cannot be read.

Returns

Promise<Uint8Array>