Registry / devops / rx-queue

rx-queue

JSON →
library1.0.5jsnpmunverified

rx-queue is a ReactiveX-based queue library offering DelayQueue, ThrottleQueue, DebounceQueue, DelayQueueExecutor, and concurrencyExecuter. Built on RxJS and IxJS, it provides easy-to-use FIFO queues with delay, throttle, and debounce features. Version 1.0.5 is the latest stable release, requiring Node >=16 and npm >=7. It ships with TypeScript types and is fully ESM. Differentiators include a simple API, RxJS integration, and built-in executor for delayed function calls.

npm install rx-queue
INSTALL
IMPORT
SIG · RX-QUEUE
R
rx-queue
devopsjavascriptv1.0.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RxQueue
import { RxQueue } from 'rx-queue'
import RxQueue from 'rx-queue'
Named export, not default. ESM-only; CommonJS not supported.
DelayQueue
import { DelayQueue } from 'rx-queue'
const { DelayQueue } = require('rx-queue')
Named export. Package is ESM-only; require() will fail.
ThrottleQueue
import { ThrottleQueue } from 'rx-queue'
Named export. Works with both TypeScript and JavaScript.
DebounceQueue
import { DebounceQueue } from 'rx-queue'
Named export. DebounceQueue drops intermediate values within the period.
DelayQueueExecutor
import { DelayQueueExecutor } from 'rx-queue'
Executes delayed function calls. Named export.
concurrencyExecuter
import { concurrencyExecuter } from 'rx-queue'
import { concurrencyExecutor } from 'rx-queue'
Named export. Note the misspelling 'concurrencyExecuter' (not 'executor').

Creates a ThrottleQueue that emits at most one item per second, demonstrating throttle behavior.

import { ThrottleQueue } from 'rx-queue'; const throttle = new ThrottleQueue(1000); throttle.subscribe(value => console.log('output:', value)); throttle.next('A'); throttle.next('B'); throttle.next('C'); // Only 'A' is output immediately; 'B' and 'C' are dropped. setTimeout(() => throttle.next('D'), 1500); // After 1.5s, 'D' is output.
Debug
Known issues
breakingVersion 1.0.5 is ESM-only. CommonJS require() will throw an error.
fix
Use import syntax or dynamic import(). Ensure your project is configured for ESM (e.g., set "type": "module" in package.json).
affects: >=1.0.0
gotchaconcurrencyExecuter() is misspelled. It is not 'concurrencyExecutor'.
fix
Use the exact function name concurrencyExecuter, or deprecate it and use alternatives.
affects: >=1.0.0
gotchaAll queues (RxQueue, DelayQueue, etc.) inherit from RxJS Subject. Calling .complete() or .error() on the queue will terminate it permanently.
fix
Avoid calling .complete() or .error() on the queue if you intend to reuse it.
affects: >=0.1.0
deprecatedIxJS (ix) is an optional dependency for concurrencyExecuter, but IxJS 4.x+ may have breaking changes.
fix
If using concurrencyExecuter, ensure ix is installed and compatible. Check migration guides.
affects: >=1.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module from ... not supported.
Using CommonJS require() on an ESM-only package.
fix
Switch to import syntax (e.g., import { RxQueue } from 'rx-queue') or use dynamic import().
TypeError: (intermediate value) is not a function when calling concurrencyExecuter
Misspelled function name or mismatched import.
fix
Ensure you import concurrencyExecuter exactly as 'concurrencyExecuter' (not 'concurrencyExecutor').
rxjs_1.Observable.create is not a function
Using older RxJS 5 style APIs; rx-queue relies on RxJS 6+.
fix
Install RxJS 6 or 7 and use pipeable operators.
Upgrade
Version history
1.0.5latest on npm
Audit
Dependencies
rxjsrequiredCore dependency for reactive streams and Subject base class
ixoptionalUsed for AsyncIterable support in concurrencyExecuter
Agent activity
2 hits · last 30 days
node
2
Resources
rx-queue — npm install rx-queue · libregistry