source: node_modules/ramda-adjunct/es/isArray.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: 613 bytes
Line 
1import { curryN, pipe, type, identical } from 'ramda';
2import isFunction from './isFunction';
3
4/**
5 * Checks if input value is `Array`.
6 *
7 * @func isArray
8 * @memberOf RA
9 * @since {@link https://char0n.github.io/ramda-adjunct/0.3.0|v0.3.0}
10 * @category Type
11 * @sig * -> Boolean
12 * @param {*} val The value to test
13 * @return {boolean}
14 * @see {@link RA.isNotArray|isNotArray}
15 * @example
16 *
17 * RA.isArray([]); //=> true
18 * RA.isArray(null); //=> false
19 * RA.isArray({}); //=> false
20 */
21var isArray = curryN(1, isFunction(Array.isArray) ? Array.isArray : pipe(type, identical('Array')));
22export default isArray;
Note: See TracBrowser for help on using the repository browser.