astro-ghostcms/.pnpm-store/v3/files/3b/439e0b84e82883105edea0798dc...

10 lines
318 B
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
module.exports = function isArrayish(obj) {
if (!obj || typeof obj === 'string') {
return false;
}
return obj instanceof Array || Array.isArray(obj) ||
(obj.length >= 0 && (obj.splice instanceof Function ||
(Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String')));
};