Skip to content

Transform async functions into sync with promise API

Notifications You must be signed in to change notification settings

jakwuh/deasync-promise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deasync-promise

Transforms async functions into sync with promise API

Usage

import deasyncPromise from 'deasync-promise';
let promiseWhichWillBeResolved = generateSuccessPromise();
let syncResult = deasyncPromise(promiseWhichWillBeResolved)

let promiseWhichWillBeRejected = generateRejectedPromise();
try {
    let syncResult = deasyncPromise(promiseWhichWillBeRejected)
} catch (err) {
}

About

Transform async functions into sync with promise API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published