promise-synchronizer
synchronize promise
Install
yarn add promise-synchronizer
Usage
Wrap async functions
const asyncFunction = async 'Fulfilled' // -> Promise { 'Fulfilled' } const syncFunction = // -> 'Fulfilled'
Wait for promises
const promiseWillFulfill = Promise// -> Fulfilled const promiseWillReject = Promise// -> Uncaught Error: Reject
Use try-catch
try console // Fulfilled catch error console // Rejected