An RxJS-based leaky bucket rate limiter implementing burstable throttling with a queue. Version 0.0.2 provides a simple, type-safe queue that allows bursts of traffic up to a configurable burst size within a sliding period. Ideal for smoothing API calls while maintaining responsiveness. Compared to simpler throttle/debounce approaches, leaky bucket permits short bursts without stuttering. Currently in early development with limited API surface. No significant release cadence established.
npm install leaky-bucket-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a LeakyBucketQueue, subscribes to items, and enqueues three string items.
Always call .subscribe() on the observable returned by consume() to start processing.
Increase burstSize or period to allow higher throughput.
Use named import: import { LeakyBucketQueue } from 'leaky-bucket-queue'Ensure import: import { LeakyBucketQueue } from 'leaky-bucket-queue'Use new LeakyBucketQueue({ burstSize: 5, period: 100 }) after correct named import.Add error callback: queue.consume().subscribe({ next: ..., error: ... })