@codinasion/queue
v1.0.2
Published
Typescript implementation of a queue data structure
Downloads
2
Maintainers
Readme
@codinasion/queue
Typescript implementation of a queue data structure.
Installation
# if you're using pnpm
pnpm add @codinasion/queue
# or, if you're using npm
npm install @codinasion/queue
# or, if you're using yarn
yarn add @codinasion/queue
Usage
import { Queue } from "@codinasion/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());