Timing and pressure control
Control when work is allowed to happen.
Pacer gives JavaScript apps typed primitives for debouncing, throttling, rate limiting, queuing, and batching so expensive work runs at the speed the product can actually afford.
00.0 MillionTotal Downloads000,000,000Weekly Downloads0GitHub StarsNoisy input
debounce search, autosave, validation
Fast events
throttle resize, scroll, pointer work
Async pressure
queue, batch, limit, cancel
raw input
router loader
paced query
router loader
input events
0
executed searches
1
result
debounceRouter loaders, preload, search params
Why Pacer
The app does not need every keypress, scroll tick, resize event, network write, or background task to run immediately. Pacer gives each workflow the timing policy it deserves.
Search, validation, autosave, and expensive calculations can wait for intent instead of firing on every keystroke.
Scroll, resize, pointer, sensor, and realtime events can stay responsive without flooding the app.
Run async tasks with FIFO, LIFO, priority, pause/resume, cancellation, retries, and concurrency control.
Collect writes, logs, telemetry, or cache operations into sensible flushes instead of shipping every item alone.
The primitive receives calls from UI events, async workflows, or service boundaries.
Timing, rate, concurrency, ordering, and batching rules decide when work may run.
Reactive state reports idle, pending, running, queued, success, error, and cancelled work.
Manual controls can flush, cancel, pause, resume, retry, or drain the current workload.
Control lifecycle
Every primitive exposes state and controls, so the product can show pending work, cancel stale tasks, flush intentionally, or pause a queue before it becomes user-visible chaos.
Async workflows
Pacer handles sync and async execution, abort controllers, retries, ordering, queue state, concurrency, and manual controls without making each feature team invent its own scheduler.
queue.add(uploadFile)
queue.setOptions({ concurrency: 3, order: "fifo" })
queue.subscribe(state => state.status)
pause/resume
stop the queue without losing work
abort
cancel stale async tasks cleanly
retry
recover transient failures
flush
run the pending batch intentionally
Framework adapters
Use Pacer in plain TypeScript, then connect the same primitives to framework state through adapters when the UI needs to react to queue, pending, error, or success state.
Feature surface
Debounce, throttle, rate limit, queue, batch, flush, cancel, pause, resume, retry, prioritize, and control concurrency from one typed set of primitives.
Open source ecosystem
Maintainers, adapters, examples, partners, and GitHub sponsors keep the timing primitives grounded in the places apps actually get overwhelmed.