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

x/esm/server/embed/types/node.ns.d.ts>Buffer.alloc

A fast, smart, & global CDN for modern(es2015+) web development.
Latest
method Buffer.alloc
import { Buffer } from "https://deno.land/x/esm@v135_2/server/embed/types/node.ns.d.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: BufferEncoding

encoding used for call to buf.fill while initalizing

Returns

Buffer