You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
204 B

4 years ago
  1. 'use strict';
  2. module.exports = function isArrayish(obj) {
  3. if (!obj) {
  4. return false;
  5. }
  6. return obj instanceof Array || Array.isArray(obj) ||
  7. (obj.length >= 0 && obj.splice instanceof Function);
  8. };