Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

std/bytes/mod.ts>BytesList#shift

Deno standard library
Go to Latest
method BytesList.prototype.shift
Deprecated
Deprecated

Use a plain array of Uint8Arrays instead. Shifting from the array can be done using conditional Array#shifts against the number of bytes left to be dropped.

If the next item in the array is longer than the number of bytes left to be dropped, then instead of shifting it out it should be replaced in-place with a subarray of itself that drops the remaining bytes from the front.

import { BytesList } from "https://deno.land/std@0.201.0/bytes/mod.ts";

Drop head n bytes.

Parameters

n: number