Modules@robinpath/promise
@robinpath/promise
0.1.1PublicAsync utilities: parallel, race, waterfall, map, retry, throttle, debounce, timeout, and concurrency control
@robinpath/promise
Async utilities: parallel, race, waterfall, map, retry, throttle, debounce, timeout, and concurrency control
Why use this module?
The promise module lets you:
- Wait for all promises
- Wait for all promises (no throw)
- First promise to settle
- First promise to fulfill
- Add timeout to promise
All functions are callable directly from RobinPath scripts with a simple, consistent API.
Installation
npm install @robinpath/promise
Quick Start
No credentials needed — start using it right away:
promise.allSettled [$p1, $p2]
Available Functions
| Function | Description |
|---|---|
promise.all | Wait for all promises |
promise.allSettled | Wait for all promises (no throw) |
promise.race | First promise to settle |
promise.any | First promise to fulfill |
promise.timeout | Add timeout to promise |
promise.delay | Resolve after delay |
promise.retry | Retry function with backoff |
promise.parallel | Run functions with concurrency limit |
promise.waterfall | Run functions in sequence, passing results |
promise.map | Map items with async function |
promise.filter | Filter items with async predicate |
promise.each | Iterate with async function |
promise.reduce | Reduce with async function |
promise.throttle | Throttle function calls |
promise.debounce | Debounce function calls |
promise.deferred | Create deferred promise |
promise.sleep | Sleep for milliseconds |
Examples
Wait for all promises (no throw)
promise.allSettled [$p1, $p2]
First promise to settle
promise.race [$p1, $p2]
First promise to fulfill
promise.any [$p1, $p2]
Integration with RobinPath
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/promise";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
promise.allSettled [$p1, $p2]
`);
Full API Reference
See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.
Related Modules
@robinpath/json— JSON module for complementary functionality
License
MIT
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.1 | latest | yesterday |
Related Modules
devops
0
@robinpath/bitbucket
v0.1.1robinpath
Bitbucket module for RobinPath.
0 downloads
...
devops
0
@robinpath/box
v0.1.1robinpath
Box module for RobinPath.
0 downloads
...
devops
0
@robinpath/cache
v0.1.1robinpath
In-memory key-value cache with optional TTL expiration for temporary data storage
0 downloads
...
devops
0
@robinpath/cloudflare
v0.1.1robinpath
Cloudflare module for RobinPath.
0 downloads
...
Install
$ robinpath install @robinpath/promise Version0.1.1
LicenseMIT
Unpacked Size5.3 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

