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 getErrorResultAsync(fn) { try { const result = await fn(); return [void 0, result]; } catch (e) { return [e, void 0]; } } //# sourceMappingURL=get-error-result-async.js.map