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

x/gauntlet/imports/buffer.ts>Buffer.alloc

Work-in-progress front-end tool which does put a smile on my face
Latest
method Buffer.alloc
import { Buffer } from "https://deno.land/x/gauntlet@v0.0.9/imports/buffer.ts";

Allocates a new buffer of {size} octets.

Parameters

size: number

count of octets to allocate.

optional
fill: string | Buffer | number

if specified, buffer will be initialized by calling buf.fill(fill). If parameter is omitted, buffer will be filled with zeros.

optional
encoding: string

encoding used for call to buf.fill while initializing