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:
896 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | var _curry1 =
|
---|
| 2 | /*#__PURE__*/
|
---|
| 3 | require("./internal/_curry1.js");
|
---|
| 4 |
|
---|
| 5 | var empty =
|
---|
| 6 | /*#__PURE__*/
|
---|
| 7 | require("./empty.js");
|
---|
| 8 |
|
---|
| 9 | var equals =
|
---|
| 10 | /*#__PURE__*/
|
---|
| 11 | require("./equals.js");
|
---|
| 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 | * R.isEmpty(Uint8Array.from('')); //=> true
|
---|
| 33 | */
|
---|
| 34 |
|
---|
| 35 |
|
---|
| 36 | var isEmpty =
|
---|
| 37 | /*#__PURE__*/
|
---|
| 38 | _curry1(function isEmpty(x) {
|
---|
| 39 | return x != null && equals(x, empty(x));
|
---|
| 40 | });
|
---|
| 41 |
|
---|
| 42 | module.exports = isEmpty; |
---|
Note:
See
TracBrowser
for help on using the repository browser.