CRNT is a TypeScript library for async and concurrent programming primitives.
npm install crnt
pnpm instsall crnt
bun add crnt
- TypeScript - first
- Unopinionated, lightweight, and un-intrusive
- Support for modern constructs (ex: AbortController)
- Performance - optimized for speed and reducing memory leaks.
- Synchronous and asynchronous methods.
The library is a modern replacement for the following popular NPM libraries
Most operations return Promise
s.
However, there are various synchronous maybe*()
methods which operates synchronously. These operations return true
if they were successful, false
otherwise.
Operations can be cancelled, either by a timeout value or an AbortSignal
.