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:
801 bytes
|
Line | |
---|
1 | import { both } from 'ramda';
|
---|
2 |
|
---|
3 | import isNotEmpty from './isNotEmpty';
|
---|
4 | import isArray from './isArray';
|
---|
5 |
|
---|
6 | /**
|
---|
7 | * Checks if input value is not an empty `Array`.
|
---|
8 | *
|
---|
9 | * @func isNonEmptyArray
|
---|
10 | * @memberOf RA
|
---|
11 | * @since {@link https://char0n.github.io/ramda-adjunct/2.4.0|v2.4.0}
|
---|
12 | * @category Type
|
---|
13 | * @sig * -> Boolean
|
---|
14 | * @param {*} val The value to test
|
---|
15 | * @return {boolean}
|
---|
16 | * @see {@link RA.isEmptyArray|isEmptyArray}
|
---|
17 | * @example
|
---|
18 | *
|
---|
19 | * RA.isNonEmptyArray([42]); // => true
|
---|
20 | * RA.isNonEmptyArray([]); // => false
|
---|
21 | * RA.isNonEmptyArray({}); // => false
|
---|
22 | * RA.isNonEmptyArray(null); // => false
|
---|
23 | * RA.isNonEmptyArray(undefined); // => false
|
---|
24 | * RA.isNonEmptyArray(42); // => false
|
---|
25 | * RA.isNonEmptyArray('42'); // => false
|
---|
26 | */
|
---|
27 | const isNonEmptyArray = both(isArray, isNotEmpty);
|
---|
28 |
|
---|
29 | export default isNonEmptyArray;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.