Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/easyts/container/types.ts>Basic

js library written with ts, use select and chan like golang in js.
Latest
class Basic
extends ClassForEach<T>
import { Basic } from "https://deno.land/x/easyts@0.1.3/container/types.ts";

The base class of the container implements some common methods for the container

Constructors

new
protected
Basic(opts?: Options<T>)

Properties

protected
opts_: Options<T> | undefined
readonly
capacity: number

Returns the current capacity of the container

readonly
isEmpty: boolean

Returns true if there is no data in the container

readonly
isFull: boolean

Returns true if the container has reached the container limit

readonly
isNotEmpty: boolean

Returns true if there is data in the container

readonly
isNotFull: boolean

Returns true if the container has not reached the container limit

readonly
reverse: Iterable<T>

Returns an object that implements a js Iterable, but it traverses the data in reverse

Methods

compareTo(o: Container<T>, callback?: CompareCallback<T>): number

Returns true if the data depth of the two containers is consistent

iterator(reverse?: boolean): Iterator<T>

Returns a js iterator

[Symbol.iterator](): Iterator<T>

implements js Iterable