source: node_modules/ramda-adjunct/src/isNotEmpty.js

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: 739 bytes
Line 
1import { complement, isEmpty } from 'ramda';
2
3/**
4 * Returns true if the given value is not its type's empty value; `false` otherwise.
5 *
6 * @func isNotEmpty
7 * @memberOf RA
8 * @since {@link https://char0n.github.io/ramda-adjunct/0.4.0|v0.4.0}
9 * @category Logic
10 * @sig * -> Boolean
11 * @param {*} val The value to test
12 * @return {boolean}
13 * @see {@link http://ramdajs.com/docs/#isEmpty|R.isEmpty}
14 * @example
15 *
16 * RA.isNotEmpty([1, 2, 3]); //=> true
17 * RA.isNotEmpty([]); //=> false
18 * RA.isNotEmpty(''); //=> false
19 * RA.isNotEmpty(null); //=> true
20 * RA.isNotEmpty(undefined): //=> true
21 * RA.isNotEmpty({}); //=> false
22 * RA.isNotEmpty({length: 0}); //=> true
23 */
24const isNotEmpty = complement(isEmpty);
25
26export default isNotEmpty;
Note: See TracBrowser for help on using the repository browser.