Global Queue

JSON →
library 1.0.1 ·javascript
verified Jun 7, 2026

A micro-package (~20 lines) that generates a push function for a global queue array (e.g., window._analytics). Version 1.0.1 is stable; no regular releases. Designed for 3rd-party analytics/tracking snippets where standard async patterns (like promises or event emitters) aren't available. Unlike bespoke queue implementations, it ensures the queue array exists and pushes raw arguments (or wrapped arrays) onto it. Intended for browser use only—no Node.js environment considered. Minimal footprint, no dependencies, and trivial API (one exported function).