Files
infocom-systems-design/node_modules/ramda/es/internal/_isArray.js
2025-10-03 22:27:28 +03:00

15 lines
452 B
JavaScript
Executable File

/**
* Tests whether or not an object is an array.
*
* @private
* @param {*} val The object to test.
* @return {Boolean} `true` if `val` is an array, `false` otherwise.
* @example
*
* _isArray([]); //=> true
* _isArray(null); //=> false
* _isArray({}); //=> false
*/
export default Array.isArray || function _isArray(val) {
return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';
};