Skip to main content

@std/streams@0.215.0

latest
Works with
It is unknown whether this package works with Node.js, Deno, Browsers, Cloudflare Workers, Bun
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Bun
JSR Score70%
Published2 years ago (0.215.0)
method Buffer.prototype.truncate
Buffer.prototype.truncate(n: number): void

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

Return Type

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/streams

Import symbol

import { Buffer } from "@std/streams";
or

Import directly with a jsr specifier

import { Buffer } from "jsr:@std/streams";