-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Eugene Lazutkin edited this page Feb 25, 2026
·
14 revisions
Lightweight library for asynchronous task scheduling and concurrency control in JavaScript. Works in browsers, Node.js, Deno, and Bun.
For installation, quick start, and browser notes see the README. For copy-pasteable examples see examples.
- Scheduler — time-based task scheduling (delays, dates, repeats)
- IdleQueue — run tasks during browser idle periods
- FrameQueue — run tasks in animation frames
- LimitedQueue — concurrency-controlled async queue
- PageWatcher — react to page lifecycle changes
- sleep() — promise-based delay
- defer() — execute on next tick
- throttle() — rate-limit a function (first call wins)
- debounce() — delay until input stabilizes
- sample() — sample at regular intervals
- audit() — collect then execute after delay
- batch() — run async ops with concurrency limit
- Throttler — key-based rate limiting
- Retainer — resource lifecycle management
- Counter — track pending task counts
- CancelTaskError — cancellation error class
- MicroTask — base task unit
- MicroTaskQueue — abstract queue base class
- ListQueue — linked-list queue implementation
- random-dist — random numbers (uniform, normal, exponential, Pareto)
- random-sleep — randomized delays from various distributions
- whenDomLoaded() — run code when DOM is ready
- whenLoaded() — run code when page is fully loaded
- AGENTS.md — project conventions for contributors and AI coding assistants
- llms.txt — machine-readable project summary
- llms-full.txt — full API reference for LLMs
Queues
Utility Functions
Supporting Classes
Base Classes
Random Utilities
Page Load Helpers
Cookbook
Built on list-toolkit