@ilihub/queue
v1.0.0
Published
Queue operations implementation in TypeScript
Downloads
4
Maintainers
Readme
@ilihub/queue
Queue operations implementation in TypeScript.
Installation
# if you're using pnpm
pnpm add @ilihub/queue
# or, if you're using npm
npm install @ilihub/queue
# or, if you're using yarn
yarn add @ilihub/queue
Usage
import { Queue } from "@ilihub/queue";
const queue = new Queue();
queue.enqueue(1);
queue.enqueue(2);
queue.dequeue();
console.log(queue.peek());
console.log(queue.isEmpty());
console.log(queue.size());
Sponsors & Backers
Support the development of new open-source projects from ilihub through crowdfunding.
The core of ilihub is our crowd-funded open-source projects, licensed under the permissive MIT license. Sponsorship increases the rate of bug fixes, documentation improvements, and feature development.