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#subarray

A fast, global content delivery network for ES Modules.
Go to Latest
method Buffer.prototype.subarray
import { Buffer } from "https://deno.land/x/esm@v97/server/embed/types/node.ns.d.ts";

Returns a new Buffer that references the same memory as the original, but offset and cropped by the start and end indices.

This method is compatible with Uint8Array#subarray().

Parameters

optional
begin: number

Where the new Buffer will start. Default: 0.

optional
end: number

Where the new Buffer will end (not inclusive). Default: buf.length.

Returns

Buffer