1.0.1 • Published 8 years ago
deasync-promise v1.0.1
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) {
}