UNPKG

ramda-extension

Version:

Helpful functions built on top of the mighty Ramda

28 lines (25 loc) 670 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _ramda = require("ramda"); /** * Returns the argument if it is not null, undefined or NaN; otherwise true is returned. * * @func * @category Logic * * @example * * R_.defaultToTrue(null); //=> true * R_.defaultToTrue(undefined); //=> true * R_.defaultToTrue('Ramda'); //=> 'Ramda' * // parseInt('string') results in NaN * R_.defaultToTrue(parseInt('string')); //=> true * * @sig a -> a | Boolean */ var defaultToTrue = (0, _ramda.defaultTo)(true); var _default = defaultToTrue; exports.default = _default;