source: node_modules/ramda/es/internal/_isArray.js@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 452 bytes
Line 
1/**
2 * Tests whether or not an object is an array.
3 *
4 * @private
5 * @param {*} val The object to test.
6 * @return {Boolean} `true` if `val` is an array, `false` otherwise.
7 * @example
8 *
9 * _isArray([]); //=> true
10 * _isArray(null); //=> false
11 * _isArray({}); //=> false
12 */
13export default Array.isArray || function _isArray(val) {
14 return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';
15};
Note: See TracBrowser for help on using the repository browser.