@clarketm/superqueue

Queue with superpowers! 💪

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
@clarketm/superqueue
Minified + gzip package size for @clarketm/superqueue in KB

Readme

Queue

NPM release

Queue with superpowers! 💪

Individual Module Installation

Yarn

$ yarn add @clarketm/superqueue

Npm

$ npm install @clarketm/superqueue --save

API

constructor(iterable: Iterable)

Construct a Queue

size: number

Get the current size of the queue

front: Item

Get the front item in the queue

rear: Item

Get the rear item in the queue

isEmpty(): boolean

Check if queue is empty

clear(): void

Clear the items from the queue

enqueue(item: Item): number

Enqueue an item into the queue

Name Type Attribute Description
item Item item to enqueue

dequeue(): Item

Dequeue an item from the queue

toArray(): Array

Convert the queue to an array

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.