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

std/encoding/binary.ts>putVarnum

Deno standard library
Go to Latest
function putVarnum
Deprecated
Deprecated

(will be removed after 0.205.0) Use DataView instead.

Encodes number x into b. Returns the number of bytes used, or 0 if b is shorter than sizeof(o.dataType).

o.dataType defaults to "int32".

import { putVarnum } from "https://deno.land/std@0.203.0/encoding/binary.ts";

Parameters

b: Uint8Array
x: number
optional
o: VarnumOptions = [UNSUPPORTED]

Returns

number