1 | var _curry1 =
|
2 | /*#__PURE__*/
|
3 | require("./internal/_curry1");
|
4 |
|
5 | var empty =
|
6 | /*#__PURE__*/
|
7 | require("./empty");
|
8 |
|
9 | var equals =
|
10 | /*#__PURE__*/
|
11 | require("./equals");
|
12 | /**
|
13 | * Returns `true` if the given value is its type's empty value; `false`
|
14 | * otherwise.
|
15 | *
|
16 | * @func
|
17 | * @memberOf R
|
18 | * @since v0.1.0
|
19 | * @category Logic
|
20 | * @sig a -> Boolean
|
21 | * @param {*} x
|
22 | * @return {Boolean}
|
23 | * @see R.empty
|
24 | * @example
|
25 | *
|
26 | * R.isEmpty([1, 2, 3]); //=> false
|
27 | * R.isEmpty([]); //=> true
|
28 | * R.isEmpty(''); //=> true
|
29 | * R.isEmpty(null); //=> false
|
30 | * R.isEmpty({}); //=> true
|
31 | * R.isEmpty({length: 0}); //=> false
|
32 | */
|
33 |
|
34 |
|
35 | var isEmpty =
|
36 | /*#__PURE__*/
|
37 | _curry1(function isEmpty(x) {
|
38 | return x != null && equals(x, empty(x));
|
39 | });
|
40 |
|
41 | module.exports = isEmpty; |
\ | No newline at end of file |