decord/source/327_areInputsEqual.js

74 lines
1.5 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 327
// Function ID: 328
2026-07-20 16:05:17 +00:00
// Name: areInputsEqual
// Dependencies: []
2026-07-29 08:29:29 +00:00
// Module 327 (areInputsEqual)
2026-07-20 16:05:17 +00:00
function areInputsEqual(arg0, arg1) {
if (arg0.length !== arg1.length) {
return false;
} else {
let num = 0;
if (0 < arg0.length) {
while (true) {
let tmp = arg0[num];
let tmp2 = arg1[num];
2026-07-29 08:29:29 +00:00
let tmp3 = num;
2026-07-20 16:05:17 +00:00
if (tmp !== tmp2) {
2026-07-29 08:29:29 +00:00
let tmp4 = ponyfill;
if (!ponyfill(tmp)) {
break;
} else if (!tmp4(tmp2)) {
2026-07-20 16:05:17 +00:00
break;
}
}
num = num + 1;
}
return false;
}
return true;
}
}
2026-07-29 08:29:29 +00:00
let ponyfill = Number.isNaN;
if (!ponyfill) {
2026-08-04 21:03:28 +00:00
ponyfill = function ponyfill(num) {
let tmp = typeof num === "number";
if (typeof num === "number") {
tmp = num != num;
2026-07-29 08:29:29 +00:00
}
return tmp;
};
}
2026-07-20 16:05:17 +00:00
export default function memoizeOne(arg0, arg1) {
let closure_0 = arg0;
let closure_1 = arg1;
let closure_4 = [];
2026-07-23 10:11:24 +00:00
let c5 = false;
2026-07-20 16:05:17 +00:00
return function memoized() {
let length;
const items = [];
let num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
2026-07-29 08:29:29 +00:00
const self = this;
2026-07-23 10:11:24 +00:00
let tmp = c5;
if (c5) {
2026-07-20 16:05:17 +00:00
tmp = self === self;
}
if (tmp) {
2026-07-23 10:11:24 +00:00
tmp = callback2(items, items);
2026-07-20 16:05:17 +00:00
}
if (!tmp) {
2026-07-23 10:11:24 +00:00
let closure_3 = callback.apply(self, items);
c5 = true;
2026-07-20 16:05:17 +00:00
}
return closure_3;
};
};