A browser-based queue managed in localStorage for batching and deferring async tasks (e.g., XHR requests) until just before page unload. Current stable version 2.9.0, released as needed on GitHub. It batches tasks into 100ms groups, supports cross-tab coordination (only one active queue per label), exponential backoff on failure, configurable batch size and timeout, and falls back to an in-memory variable if localStorage throws. Distinct from generic queue libraries by its localStorage persistence and unload-safe flushing.
npm install queue-thatNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a queue with a process function and queues a single task.
Wrap queueThat initialization in try/catch or use a polyfill for localStorage if you need guaranteed persistence.
Always call done() in your process implementation, including on error (with an error argument to trigger backoff).
Adjust batchSize or queueGroupTime to control batching behaviour.
Upgrade to v2 and call require('queue-that')() with options object.Use const queueThat = require('queue-that'); instead of import queueThat from 'queue-that'.Use distinct label strings for logically separate queues.
Ensure process() calls done() asynchronously (e.g., setTimeout 0) to avoid stack overflow.
No dependency data recorded yet.