deasync-promise
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/deasync-promise package

1.0.1 • Public • Published

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) {
}

Readme

Keywords

none

Package Sidebar

Install

npm i deasync-promise

Weekly Downloads

22,323

Version

1.0.1

License

ISC

Last publish

Collaborators

  • jakwuh