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