source: node_modules/ramda/src/internal/_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: 454 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 */
13module.exports = 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.