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:
821 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | import { complement } from 'ramda';
|
---|
| 2 |
|
---|
| 3 | import isNilOrEmpty from './isNilOrEmpty';
|
---|
| 4 |
|
---|
| 5 | /**
|
---|
| 6 | * Returns `false` if the given value is its type's empty value, `null` or `undefined`.
|
---|
| 7 | *
|
---|
| 8 | * @func isNotNilOrEmpty
|
---|
| 9 | * @memberOf RA
|
---|
| 10 | * @since {@link https://char0n.github.io/ramda-adjunct/2.18.0|v2.18.0}
|
---|
| 11 | * @category Type
|
---|
| 12 | * @sig * -> Boolean
|
---|
| 13 | * @param {*} val The value to test
|
---|
| 14 | * @return {boolean}
|
---|
| 15 | * @see {@link RA.isNilOrEmpty|isNilOrEmpty}
|
---|
| 16 | * @example
|
---|
| 17 | *
|
---|
| 18 | * RA.isNotNilOrEmpty([1, 2, 3]); //=> true
|
---|
| 19 | * RA.isNotNilOrEmpty([]); //=> false
|
---|
| 20 | * RA.isNotNilOrEmpty(''); //=> false
|
---|
| 21 | * RA.isNotNilOrEmpty(null); //=> false
|
---|
| 22 | * RA.isNotNilOrEmpty(undefined): //=> false
|
---|
| 23 | * RA.isNotNilOrEmpty({}); //=> false
|
---|
| 24 | * RA.isNotNilOrEmpty({length: 0}); //=> true
|
---|
| 25 | */
|
---|
| 26 | const isNotNilOrEmpty = complement(isNilOrEmpty);
|
---|
| 27 |
|
---|
| 28 | export default isNotNilOrEmpty;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.