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

std/node/buffer.ts>default.alloc

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
method default.alloc
import { default } from "https://deno.land/std@0.74.0/node/buffer.ts";

Allocates a new Buffer of size bytes.

Parameters

size: number
optional
fill:
| number
| string
| Uint8Array
| Buffer
optional
encoding = [UNSUPPORTED]

Returns

Buffer