Skip to main content
The Deno 2 Release Candidate is here
Learn more
Latest
function readVarnum
import { readVarnum } from "https://deno.land/x/denjucks@1.1.1/src/deps/path/std/encoding/binary.ts";

Reads a number from r, comsuming sizeof(o.dataType) bytes. Data-type defaults to int32.

Returns it as number, or throws Deno.errors.UnexpectedEof if not enough bytes can be read.

Parameters

optional
o: VarnumOptions = [UNSUPPORTED]

Returns

Promise<number>