UNPKG

return-style

Version:

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

10 lines 235 B
export async function getSuccessPromise(promise) { try { const result = await promise; return [true, result]; } catch { return [false, void 0]; } } //# sourceMappingURL=get-success-promise.js.map