UNPKG

@prelude/function

Version:

Function module.

9 lines 298 B
import rescue from './rescue.js'; /** * Mutes thunk throwing an error. * * @returns `defaultValue` if `thunk` throws, otherwise returns the return value of `thunk`. */ const mute = (thunk, defaultValue) => rescue(thunk, () => defaultValue); export default mute; //# sourceMappingURL=mute.js.map