UNPKG

@prelude/function

Version:

Function module.

13 lines 344 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** Rescues thunk throwing an error with provided fallback function. */ const rescue = (thunk, fallback) => { try { return thunk(); } catch (err) { return fallback(err); } }; exports.default = rescue; //# sourceMappingURL=rescue.js.map