Skip to main content
Module

x/netzo/deno.d.ts>Deno.Buffer#grow

SDK for Netzo, the open Web platform to unify IoT devices, applications and services.
Go to Latest
method Deno.Buffer.prototype.grow
import { Deno } from "https://deno.land/x/netzo@v0.1.10/deno.d.ts";
const { Buffer } = Deno;

Grows the buffer's capacity, if necessary, to guarantee space for another n bytes. After .grow(n), at least n bytes can be written to the buffer without another allocation. If n is negative, .grow() will throw. If the buffer can't grow it will throw an error.

Based on Go Lang's Buffer.Grow.

Parameters

n: number