UNPKG

return-style

Version:

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

10 lines 234 B
export async function getResultErrorAsync(fn) { try { const result = await fn(); return [result, void 0]; } catch (e) { return [void 0, e]; } } //# sourceMappingURL=get-result-error-async.js.map