UNPKG

return-style

Version:

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

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