@datastructures/queue ➡️|➡️|

A minimal functional typed implementation of a queue. 🦄
An ordered structure of data inputs obeying the principle of first in, first out.
Install
yarn add @datastructures/queue -D
Usage
import { queue } from '@datastructures/queue'
const todo = queue()
todo.add('do laundry')
todo.add('wash car')
todo.remove()
todo.print()
todo.length()
API
Methods
add(item) adds an item to the queue
ex: queue.add('foo')
remove() removes the last item from the queue
ex: queue.remove()
length() returns the length of the queue
print() prints all items in the queue
Data Structures 🦄
Basic. Functional. Typed. Data Structures.
Functional typed data structures offering structure clarity and simplicity.