Asyncbox

asyncbox

A collection of small async/await utilities.

A simple collection of tiny useful async/await utilities, the below are the list of function that asyncbox gives:

  • sleep
  • retry
  • nodeify
  • nodeifyAll
  • retryInterval
  • asyncify
  • parallel
  • asyncmap
  • asyncfilter
  • waitForCondition

Get it: npm install --save asyncbox

Usage:

1
2
3
4
5
6
7
8
9
import { sleep } from 'asyncbox';

async function myFn () {
    // do some stuff 
    await sleep(1000); // wait one second 
    // do some other stuff 
};

myFn();

GIF FTW!

asyncbox

Suggest a module

Comments