ramda-adjunct
Version:
Ramda Adjunct is the most popular and most comprehensive set of utilities for use with Ramda, providing a variety of useful, well tested functions with excellent documentation.
33 lines (30 loc) • 1.01 kB
JavaScript
exports.__esModule = true;
exports["default"] = void 0;
var _ramda = require("ramda");
/**
* In JavaScript, a `truthy` value is a value that is considered true
* when evaluated in a Boolean context. All values are truthy unless
* they are defined as falsy (i.e., except for `false`, `0`, `""`, `null`, `undefined`, and `NaN`).
*
* @func isTruthy
* @memberOf RA
* @since {@link https://char0n.github.io/ramda-adjunct/2.2.0|v2.2.0}
* @category Type
* @sig * -> Boolean
* @param {*} val The value to test
* @return {boolean}
* @see {@link https://developer.mozilla.org/en-US/docs/Glossary/Truthy|truthy}, {@link RA.isFalsy|isFalsy}
* @example
*
* RA.isTruthy({}); // => true
* RA.isTruthy([]); // => true
* RA.isTruthy(42); // => true
* RA.isTruthy(3.14); // => true
* RA.isTruthy('foo'); // => true
* RA.isTruthy(new Date()); // => true
* RA.isTruthy(Infinity); // => true
*/
var isTruthy = (0, _ramda.curryN)(1, Boolean);
var _default = isTruthy;
exports["default"] = _default;
;