seuss-queue
v1.0.0
Published
Efficient memory based queue
Downloads
1
Readme
Seuss Queue
Efficient memory based queue.
const seuss = require('seuss-queue')
const queue = seuss()
queue.enqueue({ item: 1 })
queue.enqueue({ item: 2 })
console.log(queue.peek()) // item: 1
queue.dequeue()
console.log(queue.peek()) // item: 2
console.log(queue.length()) // 1
console.log(queue.all()) // [{ item : 2 }]
queue.compact() // optionally save space