decord/source/utils/FunctionUtils.tsx

67 lines
1.5 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 1917
2026-07-27 11:26:19 +00:00
// Function ID: 21610
2026-07-20 16:05:17 +00:00
// Name: areArraysShallowlyEqual
2026-07-23 10:11:24 +00:00
// Dependencies: [2]
2026-07-20 16:05:17 +00:00
// Exports: cachedFunction, clearObject, isPlainObjectEmpty
2026-07-25 08:10:48 +00:00
// Module 1917 (areArraysShallowlyEqual)
2026-07-20 16:05:17 +00:00
function areArraysShallowlyEqual(arg0, arg1) {
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-23 10:11:24 +00:00
const result = require("set").fileFinishedImporting("utils/FunctionUtils.tsx");
2026-07-20 16:05:17 +00:00
export { areArraysShallowlyEqual };
export function cachedFunction(arg0) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
let c1 = null;
let c2 = null;
2026-07-20 16:05:17 +00:00
return (arg0) => {
const items = [...arguments];
2026-07-23 10:11:24 +00:00
if (!callback(items, items)) {
2026-07-20 16:05:17 +00:00
const items1 = [];
HermesBuiltin.arraySpread(items, 0);
let closure_2 = HermesBuiltin.apply(items1, undefined);
}
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;
}
};
export function isPlainObjectEmpty(arg0) {
const keys = Object.keys();
if (keys !== undefined) {
if (keys[tmp] !== undefined) {
return false;
}
}
return true;
}