439e0b84e82883105edea0798dc9287a4b9788569e4426233fa43e97b442efb24ba268f0e8a10ceed15273d9b837b3dbd920c10db41d45048d03c86e2d6caf 318 B

123456789
  1. module.exports = function isArrayish(obj) {
  2. if (!obj || typeof obj === 'string') {
  3. return false;
  4. }
  5. return obj instanceof Array || Array.isArray(obj) ||
  6. (obj.length >= 0 && (obj.splice instanceof Function ||
  7. (Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String')));
  8. };