UNPKG

tamda

Version:

Practical functional programming library for TypeScript

8 lines 298 B
/** * Returns the supplied value if the actual value is `null`, `undefined` or `NaN`, * otherwise returns the actual value itself. */ export function defaultTo(value) { return (actual) => actual == null || Number.isNaN(actual) ? value : actual; } //# sourceMappingURL=defaultTo.js.map