UNPKG

return-style

Version:

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

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