Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/poolifier/src/circular-array.ts>CircularArray

Fast and small web worker pool
Latest
class CircularArray
extends Array<T>
import { CircularArray } from "https://deno.land/x/poolifier@v0.3.14/src/circular-array.ts";

Array with a maximum length and shifting items when full.

Constructors

new
CircularArray(size?: number, ...items: T[])

Properties

size: number

Methods

private
checkSize(size: number): void
concat(...items: Array<T | ConcatArray<T>>): CircularArray<T>
empty(): boolean
full(): boolean
push(...items: T[]): number
resize(size: number): void
splice(
start: number,
deleteCount?: number,
...items: T[],
): CircularArray<T>
unshift(...items: T[]): number