decord/source/utils/FunctionUtils.tsx

93 lines
2.2 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 1990
// Function ID: 1991
2026-07-20 16:05:17 +00:00
// Name: areArraysShallowlyEqual
2026-07-23 10:11:24 +00:00
// Dependencies: [2]
2026-07-29 08:29:29 +00:00
// Exports: areArraysShallowlyEqual, cachedFunction, clearObject, isPlainObjectEmpty
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 1990 (areArraysShallowlyEqual)
import set from "set" /* 2 */;
const result = set.fileFinishedImporting("utils/FunctionUtils.tsx");
2026-07-29 08:29:29 +00:00
export const areArraysShallowlyEqual = function areArraysShallowlyEqual(arg0, arg1) {
2026-07-20 16:05:17 +00:00
if (arg0 === arg1) {
return true;
} else {
if (null != arg0) {
if (null != arg1) {
if (arg0.length === arg1.length) {
let num = 0;
if (0 < arg0.length) {
while (arg0[num] === arg1[num]) {
num = num + 1;
}
return false;
}
return true;
}
}
}
return false;
}
2026-07-29 08:29:29 +00:00
};
2026-07-20 16:05:17 +00:00
export function cachedFunction(arg0) {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
c1 = null;
c2 = null;
2026-07-29 08:29:29 +00:00
return () => {
2026-07-20 16:05:17 +00:00
const items = [...arguments];
2026-07-29 08:29:29 +00:00
let flag = true;
if (items !== items) {
flag = false;
if (null != arr2) {
flag = false;
if (null != items) {
flag = false;
if (arr2.length === items.length) {
let num2 = 0;
flag = true;
if (0 < arr2.length) {
flag = false;
while (arr2[num2] === items[num2]) {
let sum = num2 + 1;
num2 = sum;
flag = true;
if (sum >= length) {
break;
}
}
}
}
}
}
}
if (!flag) {
2026-07-20 16:05:17 +00:00
const items1 = [];
HermesBuiltin.arraySpread(items, 0);
2026-08-24 06:08:38 +00:00
closure_2 = HermesBuiltin.apply(items1, undefined);
2026-07-20 16:05:17 +00:00
}
return closure_2;
};
}
export const clearObject = function clearObject(obj) {
for (const key10003 in arg0) {
2026-07-23 10:11:24 +00:00
let tmp3 = key10003;
2026-07-20 16:05:17 +00:00
if (!arg0.hasOwnProperty(key10003)) {
continue;
} else {
2026-07-23 10:11:24 +00:00
delete tmp[tmp2];
continue;
2026-07-20 16:05:17 +00:00
}
continue;
}
};
2026-07-29 08:29:29 +00:00
export const isPlainObjectEmpty = function isPlainObjectEmpty(arg0) {
2026-07-20 16:05:17 +00:00
const keys = Object.keys();
if (keys !== undefined) {
if (keys[tmp] !== undefined) {
return false;
}
}
return true;
2026-07-29 08:29:29 +00:00
};