A lightweight queue that persists items to the filesystem to save memory. Version 0.1.3. It uses a file as a buffer, writing and reading items sequentially. It provides basic push, shift, reset, and close operations with drain and reset events. It includes TypeScript definitions and supports custom serializers and deserializers. The package is intended for scenarios where memory needs to be conserved but persistence is not critical.
npm install disk-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a disk-persisted queue, pushes an item, shifts it out, and listens for drain event.
Ensure no push() calls after close() or re-instantiate the queue.
Check remainCount before calling shift() if undefined is a concern.
Call queue.reset() or delete the file manually after usage.
Use 'import' syntax and ensure 'type': 'module' in package.json or install esm package. For TypeScript, add 'moduleResolution': 'node' or 'bundler'.
Ensure queue.close() is called for each instance when no longer needed.
No dependency data recorded yet.