UNPKG

return-style

Version:

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

10 lines 215 B
export function getResultError(fn) { try { const result = fn(); return [result, void 0]; } catch (err) { return [void 0, err]; } } //# sourceMappingURL=get-result-error.js.map