-
zero-overhead-promise-lock Public
An efficient Promise lock for Node.js projects, ensuring mutually exclusive execution of asynchronous tasks. Key features include a backpressure indicator and the ability to gracefully await the co…
TypeScript Apache License 2.0 UpdatedFeb 16, 2025 -
Promise Semaphore for Node.js projects, inspired by the RAII idiom. Offering backpressure control for enhanced efficiency, utilizing a communicative API that signals availability. Additionally, it …
-
fifo-ttl-cache Public
An efficient in-memory FIFO cache with a fixed TTL for Node.js projects, designed to automatically remove outdated records. Unlike widely used LRU caches, FIFO caches do not prioritize retaining po…
TypeScript Apache License 2.0 UpdatedJan 7, 2025 -
A modern Promise rate-limiter for Node.js projects, implementing a fixed-window throttling policy. It restricts the number of tasks that can start execution within distinct, non-overlapping time wi…
TypeScript Apache License 2.0 UpdatedDec 27, 2024 -
A modern weighted promise semaphore for Node.js projects, ideal for managing workloads with varying processing requirements. It allows limiting the total weight of concurrently executing jobs, ensu…
TypeScript Apache License 2.0 UpdatedDec 21, 2024 -
Periodic job scheduler for Node.js projects, ensuring non-overlapping executions and deterministic termination. Features a dynamically chosen interval between executions, determined by a user-injec…
TypeScript MIT License UpdatedDec 10, 2024 -
An in-memory priority queue that prevents starvation by balancing priority and arrival time. Items are greedily prioritized within each batch of the longest-waiting items, ensuring fairness alongsi…
TypeScript Apache License 2.0 UpdatedDec 7, 2024 -
data-oriented-slim-queue Public
A slim and efficient in-memory queue with a basic API for Node.js projects. The implementation employs Data-Oriented Design using a cyclic buffer, optimizing memory layout through sequential item a…
TypeScript Apache License 2.0 UpdatedNov 23, 2024 -
data-oriented-slim-deque Public
A slim and efficient in-memory Deque (doubly-ended queue) for Node.js projects, designed with Data-Oriented Design principles and implemented using a cyclic buffer to optimize memory layout through…
TypeScript Apache License 2.0 UpdatedNov 19, 2024 -
An efficient random item sampler that ensures O(1) sampling complexity, and equal selection probability for all items across cycles. Each cycle ensures unique, non-repeating item selections, with e…
TypeScript Apache License 2.0 UpdatedNov 10, 2024 -
weighted-random-item-sampler Public
A weighted random item sampler (selector), where the probability of selecting an item is proportional to its weight. The sampling method utilizes a binary search optimization, making it suitable fo…
TypeScript Apache License 2.0 UpdatedOct 26, 2024 -
A weighted random item sampler (selector), where the probability of selecting an item is proportional to its weight, and every item is sampled exactly once (without repetition or replacement). The …
TypeScript Apache License 2.0 UpdatedOct 26, 2024 -
delayed-async-task Public
A modern `setTimeout` substitute tailored for asynchronous tasks, designed to schedule a single delayed execution. Features status getters to communicate the execution status, the ability to abort …
TypeScript MIT License UpdatedOct 9, 2024 -
delayed-async-tasks-manager Public
A scheduler for one-time (non-periodic) asynchronous tasks, designed to manage delayed executions. It features status getters to communicate the execution state, a robust error handling mechanism f…