UNPKG

return-style

Version:

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

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