decord/source/6366_isArrayish.js

42 lines
989 B
JavaScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 6366
// Function ID: 6367
2026-07-20 16:05:17 +00:00
// Name: isArrayish
// Dependencies: []
2026-08-24 06:08:38 +00:00
// Module 6366 (isArrayish)
2026-07-20 16:05:17 +00:00
2026-08-04 21:03:28 +00:00
export default function isArrayish(str) {
let tmp = !str;
if (str) {
tmp = typeof str === "string";
2026-07-20 16:05:17 +00:00
}
let tmp2 = !tmp;
if (!tmp) {
const _Array = Array;
2026-08-04 21:03:28 +00:00
let isArray = str instanceof Array;
2026-07-20 16:05:17 +00:00
if (!isArray) {
const _Array2 = Array;
2026-08-04 21:03:28 +00:00
isArray = Array.isArray(str);
2026-07-20 16:05:17 +00:00
}
if (!isArray) {
2026-08-04 21:03:28 +00:00
let tmp5 = str.length >= 0;
2026-07-20 16:05:17 +00:00
if (tmp5) {
const _Function = Function;
2026-08-04 21:03:28 +00:00
let tmp6 = str.splice instanceof Function;
2026-07-20 16:05:17 +00:00
if (!tmp6) {
const _Object = Object;
2026-08-04 21:03:28 +00:00
let ownPropertyDescriptor = Object.getOwnPropertyDescriptor(str, str.length - 1);
2026-07-20 16:05:17 +00:00
if (ownPropertyDescriptor) {
2026-08-04 21:03:28 +00:00
ownPropertyDescriptor = "String" !== str.constructor.name;
2026-07-20 16:05:17 +00:00
}
tmp6 = ownPropertyDescriptor;
}
tmp5 = tmp6;
}
isArray = tmp5;
}
tmp2 = isArray;
}
return tmp2;
};