decord/source/4180_shallowEqual.js

60 lines
1.7 KiB
JavaScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 4180
// Function ID: 4181
2026-07-29 08:29:29 +00:00
// Name: shallowEqual
// Dependencies: []
2026-08-05 07:35:12 +00:00
// Module 4180 (shallowEqual)
2026-07-29 08:29:29 +00:00
2026-08-04 21:03:28 +00:00
export default function shallowEqual(obj, obj2, call) {
2026-07-29 08:29:29 +00:00
if (!call) {
2026-08-04 21:03:28 +00:00
if (obj === obj2) {
2026-07-29 08:29:29 +00:00
return true;
} else {
2026-08-04 21:03:28 +00:00
if (typeof obj === "object") {
if (obj) {
if (typeof obj2 === "object") {
if (obj2) {
2026-07-29 08:29:29 +00:00
const _Object = Object;
2026-08-04 21:03:28 +00:00
const keys = Object.keys(obj);
2026-07-29 08:29:29 +00:00
const _Object2 = Object;
2026-08-04 21:03:28 +00:00
if (keys.length !== Object.keys(obj2).length) {
2026-07-29 08:29:29 +00:00
return false;
} else {
const _Object3 = Object;
if (0 < keys.length) {
while (tmp9(keys[num])) {
2026-08-04 21:03:28 +00:00
let tmp5 = obj[tmp3];
let tmp6 = obj2[tmp3];
2026-07-29 08:29:29 +00:00
if (!call) {
return false;
} else {
let call2 = call.call;
if (typeof call2 === "unknown") {
let call2Result = call(tmp5, tmp6, tmp3);
} else {
let tmp10 = call;
let tmp11 = arg3;
let tmp12 = tmp5;
let tmp13 = tmp6;
let tmp14 = tmp3;
call2Result = call2(arg3, tmp5, tmp6, tmp3);
}
let tmp8 = call2Result;
}
}
return false;
}
return true;
}
}
}
}
}
return false;
}
} else {
call = call.call;
2026-08-04 21:03:28 +00:00
typeof call === "unknown" ? call(obj, obj2) : call(arg3, obj, obj2);
2026-07-29 08:29:29 +00:00
}
};