Skip to main content

latest
JSR Score
76%
Published
a week ago (0.0.5)

@stdext/collections

The collections package contains commonly used utilities and structures.

Entrypoints

Deferred Stack

Contains the DeferredStack utility class.

const deferred = new DeferredStack<number>({ maxSize: 1 });
deferred.add(1);
const e1 = await deferred.pop();
setTimeout(() => e1.release(), 5000);
const e2 = await deferred.pop(); // will be queued until e1 is released

Add Package

deno add @stdext/collections

Import symbol

import * as mod from "@stdext/collections";

Add Package

npx jsr add @stdext/collections

Import symbol

import * as mod from "@stdext/collections";

Add Package

yarn dlx jsr add @stdext/collections

Import symbol

import * as mod from "@stdext/collections";

Add Package

pnpm dlx jsr add @stdext/collections

Import symbol

import * as mod from "@stdext/collections";

Add Package

bunx jsr add @stdext/collections

Import symbol

import * as mod from "@stdext/collections";