Show it when it matters.

Composable frequency capping for popups, toasts and guides across every JavaScript runtime.

Try showing a coupon.

Once a day. Three times in seven days. Four hours between shows.

Allowed

Remaining
1
Next available
—

In-memory records and a simulated clock. No real user records are saved.

One decision. Four primitives.

Combine calendar limits, sliding windows, cooldowns and lifetime caps. The strictest rule wins.

Atomic by default

tryConsume checks and records in one synchronous step, preventing double popups in one JavaScript context.

Seven adapters

Web, session, React Native, WeChat, Alipay, Node.js and memory.

2.06 kB

Core, minified + Brotli (1.0.1). A 3.5 kB CI budget uses the same compression.