UNPKG

fully-optional

Version:
14 lines (13 loc) 433 B
import curryLast from './curryLast'; import { withDefaultLazy } from './withDefaultLazy'; var _withDefault = function (value, defaultValue) { return withDefaultLazy(value, function () { return defaultValue; }); }; export function withDefault() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } return curryLast(_withDefault, args); } export default withDefault;