queue-package

1.0.0 • Public • Published

Queue

A simple JavaScript implementation of a queue data structure using a factory function.

Methods

Methods

  • enqueue(item): Adds an item to the back of the queue.
  • dequeue(): Removes and returns the front item of the queue.
  • front(): Returns the front item of the queue without removing it.
  • isEmpty(): Checks if the queue is empty and returns a boolean.
  • size(): Returns the current size of the queue.
  • print(): Prints the items of the queue in the order they appear.

Readme

Keywords

none

Package Sidebar

Install

npm i queue-package

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

9.79 kB

Total Files

12

Last publish

Collaborators

  • alvin-kuria