main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1013 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | exports.__esModule = true;
|
---|
4 | exports["default"] = void 0;
|
---|
5 | var _ramda = require("ramda");
|
---|
6 | /**
|
---|
7 | * In JavaScript, a `truthy` value is a value that is considered true
|
---|
8 | * when evaluated in a Boolean context. All values are truthy unless
|
---|
9 | * they are defined as falsy (i.e., except for `false`, `0`, `""`, `null`, `undefined`, and `NaN`).
|
---|
10 | *
|
---|
11 | * @func isTruthy
|
---|
12 | * @memberOf RA
|
---|
13 | * @since {@link https://char0n.github.io/ramda-adjunct/2.2.0|v2.2.0}
|
---|
14 | * @category Type
|
---|
15 | * @sig * -> Boolean
|
---|
16 | * @param {*} val The value to test
|
---|
17 | * @return {boolean}
|
---|
18 | * @see {@link https://developer.mozilla.org/en-US/docs/Glossary/Truthy|truthy}, {@link RA.isFalsy|isFalsy}
|
---|
19 | * @example
|
---|
20 | *
|
---|
21 | * RA.isTruthy({}); // => true
|
---|
22 | * RA.isTruthy([]); // => true
|
---|
23 | * RA.isTruthy(42); // => true
|
---|
24 | * RA.isTruthy(3.14); // => true
|
---|
25 | * RA.isTruthy('foo'); // => true
|
---|
26 | * RA.isTruthy(new Date()); // => true
|
---|
27 | * RA.isTruthy(Infinity); // => true
|
---|
28 | */
|
---|
29 | var isTruthy = (0, _ramda.curryN)(1, Boolean);
|
---|
30 | var _default = isTruthy;
|
---|
31 | exports["default"] = _default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.