source: node_modules/ramda-adjunct/lib/isNilOrEmpty.js@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 942 bytes
RevLine 
[d24f17c]1"use strict";
2
3exports.__esModule = true;
4exports["default"] = void 0;
5var _ramda = require("ramda");
6/**
7 * Returns `true` if the given value is its type's empty value, `null` or `undefined`.
8 *
9 * @func isNilOrEmpty
10 * @memberOf RA
11 * @since {@link https://char0n.github.io/ramda-adjunct/0.4.0|v0.4.0}
12 * @category Type
13 * @sig * -> Boolean
14 * @param {*} val The value to test
15 * @return {boolean}
16 * @see {@link http://ramdajs.com/docs/#isEmpty|R.isEmpty}, {@link http://ramdajs.com/docs/#isNil|R.isNil}
17 * @example
18 *
19 * RA.isNilOrEmpty([1, 2, 3]); //=> false
20 * RA.isNilOrEmpty([]); //=> true
21 * RA.isNilOrEmpty(''); //=> true
22 * RA.isNilOrEmpty(null); //=> true
23 * RA.isNilOrEmpty(undefined): //=> true
24 * RA.isNilOrEmpty({}); //=> true
25 * RA.isNilOrEmpty({length: 0}); //=> false
26 */
27var isNilOrEmpty = (0, _ramda.curryN)(1, (0, _ramda.either)(_ramda.isNil, _ramda.isEmpty));
28var _default = isNilOrEmpty;
29exports["default"] = _default;
Note: See TracBrowser for help on using the repository browser.