jscommunity

jscommunity/promise-toolbox

Essential utils for promises.

JavaScript
10
1
No license

do stuff regarding the cancelation request. }); // do other stuff. }); asyncFunction(1, 2).cancel(); ``` #### Compatibility with AbortSignal AbortSignal is a new API from the WHATWG to provide a cancelation mechanism for web APIs. CancelToken can be converted to AbortSignal and the other way around, so they can be used interchangeably. ```js import { CancelToken } from "promise-toolbox"; // From AbortSignal to CancelToken. const cancelToken = CancelToken.fromAbortSignal(signal); // From CancelToken to AbortSignal. const signal = cancelToken.toAbortSignal(); ``` ### Resource management #### Creation ```js import { resource } from "promise-toolbox"; ``` #### Combination ```js import { all, race } from "promise-toolbox"; ``` #### Consumption ```js import { all, race } from "promise-toolbox"; ``` ### Functions ```js import { asyncFn, defer, fromCallback, fromEvent, fromEvents, isPromise, nodeify, pipe, promisify, retry, tryFn, wrapApply, wrapCall } from "promise-toolbox"; ``` #### asyncFn(generator) > Create an async function from a generator. ```js const

Total donated
Undistributed
Share with your subscribers:

Recipients

How the donated funds are distributed

Support the dependencies

Support the repos that depend on this repository

Top contributors

julien-f's profile
julien-f
307 contributions
greenkeeperio-bot's profile
greenkeeperio-bot
8 contributions
greenkeeper[bot]'s profile
greenkeeper[bot]
4 contributions
perrin4869's profile
perrin4869
1 contributions

Recent events

Kivach works on the Obyte network, and therefore you can track all donations.

No events yet