@mrnkr/simple-queue
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

simple-queue

Introduction

The smallest possible implementation of a queue. Need simplicity? Here it is. 100% code coverage in tests, all alternatives I could think of are taken into consideration as well. Hence, it is as robust as it can be... (that statement may backfire, be gentle 😅)

Quick start

The specification is the following:

export interface Queue<T> {

  enqueue(val: T): void;
  next(): T | undefined;

  length: number;

}

All methods do exactly what they are meant to do in the provided implementation (QueueImpl). You may reimplement this interface, extend it, do as you wish, really.

Readme

Keywords

none

Package Sidebar

Install

npm i @mrnkr/simple-queue

Weekly Downloads

4

Version

1.0.5

License

MIT

Unpacked Size

12.8 kB

Total Files

22

Last publish

Collaborators

  • mrnkr