Skip to main content
Module

x/stream_slicing/partial_reader.ts>PartialReader#readAmount

Deno and Node.js library for working with web standard streams
Latest
method PartialReader.prototype.readAmount
import { PartialReader } from "https://deno.land/x/stream_slicing@v1.1.0/partial_reader.ts";

Reads and returns size bytes from the stream, or less if the stream ends.

Parameters

size: number

Returns

Promise<Uint8Array>

A Uint8Array of size bytes or less.