An open API service indexing awesome lists of open source software.

https://github.com/spazmodius/queue

Fast memory-effecient FIFO queue for Node.js
https://github.com/spazmodius/queue

module node

Last synced: about 2 months ago
JSON representation

Fast memory-effecient FIFO queue for Node.js

Awesome Lists containing this project

README

          

# Spaz's FIFO Queue

A smokin' fast, memory-effecient FIFO queue for Node.js.

## Install
`npm install spazmodius/queue`

## Usage
``` js
const Queue = require('@spazmodius/queue')

const q = Queue() // or new Queue; you do you

q.enqueue('a')
q.enqueue(4)

console.log(q.length) // 2

console.log(q.dequeue()) // "a"
console.log(q.dequeue()) // 4
console.log(q.dequeue()) // undefined
```

That's it, pretty simple.