Double-linked-list FIFO queue (v2.4.1, stable, low churn). O(1) push/shift/unshift/remove/move operations. Unlike array-based queues, removal of arbitrary nodes is O(1) by retaining node references. Supports iteration and bumping nodes to end. Minimal API, no dependencies. Suitable for high-performance queuing in Node.js or browser (bundled).
npm install fifoNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic queue operations: push, shift, first, remove, and length.
Always call fifo() to create a new instance: const q = fifo();
Do not mutate node.prev or node.next. Use fifo.remove(node) for safe removal.
Use const node = fifo.push('val'); const value = node.value;Use fifo.first() to peek at the first value, or iterate with fifo.forEach().
Use const fifo = require('fifo'); const queue = fifo();Shift returns the value directly, not a node. Use fifo.remove(node) and then node.value before removal.
Call fifo() first: const queue = fifo(); queue.remove(node);
No dependency data recorded yet.