UNPKG

util-ex

Version:

Browser-friendly enhanced util fully compatible with standard node.js

18 lines (16 loc) 532 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isArray = exports.default = void 0; const toString = Object.prototype.toString; /** * Determines whether a given value is an Array. * * @param {*} obj - The value to be checked. * @returns {boolean} `true` if the value is an Array, `false` otherwise. */ const isArray = exports.isArray = Array.isArray ? Array.isArray : function isArray(obj) { return toString.call(obj) === "[object Array]"; }; var _default = exports.default = isArray;