UNPKG

return-style

Version:

Non-intrusively convert the result of any function or promise to the user's desired style.

10 lines 219 B
export async function getFailurePromise(promise) { try { await promise; return [false, void 0]; } catch (e) { return [true, e]; } } //# sourceMappingURL=get-failure-promise.js.map