Skip to main content
Module

x/silicon/deps.ts>io.Buffer#truncate

Deno module to generate images from source code using Aloxaf/silicon.
Go to Latest
method io.Buffer.prototype.truncate
Re-export
import { io } from "https://deno.land/x/silicon@v0.0.6/deps.ts";
const { Buffer } = io;

Discards all but the first n unread bytes from the buffer but continues to use the same allocated storage. It throws if n is negative or greater than the length of the buffer.

Parameters

n: number