The below code provides a fallback implementation for Array.isArray() in environments where it might not be available (older browsers or JavaScript environments).
var nativeIsArray = Array.isArray
var toString = Object.prototype.toString
module.exports = nativeIsArray || isArray
function isArray(obj) {
return toString.call(obj) === "[object Array]"
}
Top comments (0)