ramda-extension
Version:
Helpful functions built on top of the mighty Ramda
28 lines (25 loc) • 685 B
JavaScript
;
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 the false is returned.
*
* @func
* @category Logic
*
* @example
*
* R_.defaultToFalse(null); //=> false
* R_.defaultToFalse(undefined); //=> false
* R_.defaultToFalse('Ramda'); //=> 'Ramda'
* // parseInt('string') results in NaN
* R_.defaultToFalse(parseInt('string')); //=> false
*
* @sig a -> a | Boolean
*/
var defaultToFalse = (0, _ramda.defaultTo)(false);
var _default = defaultToFalse;
exports.default = _default;