Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

std/io/iotest.ts>HalfReader

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
class HalfReader
implements Reader
import { HalfReader } from "https://deno.land/std@0.42.0/io/iotest.ts";

HalfReader returns a Reader that implements Read by reading half as many requested bytes from r.

Constructors

new
HalfReader(r: Reader)

Methods

read(p: Uint8Array): Promise<number | null>