IsArray.js 349 B

123456789101112
  1. 'use strict';
  2. var GetIntrinsic = require('get-intrinsic');
  3. var $Array = GetIntrinsic('%Array%');
  4. // eslint-disable-next-line global-require
  5. var toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');
  6. module.exports = $Array.isArray || function IsArray(argument) {
  7. return toStr(argument) === '[object Array]';
  8. };