django-vue3-admin-web/node_modules/@interactjs/utils/shallowEqual.js
2025-10-20 21:21:14 +08:00

29 lines
619 B
JavaScript

/**
* interact.js 1.10.27
*
* Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>
* Released under the MIT License.
* https://raw.github.com/taye/interact.js/main/LICENSE
*/
function shallowEqual(left, right) {
if (left === right) {
return true;
}
if (!left || !right) {
return false;
}
const leftKeys = Object.keys(left);
if (leftKeys.length !== Object.keys(right).length) {
return false;
}
for (const key of leftKeys) {
if (left[key] !== right[key]) {
return false;
}
}
return true;
}
export { shallowEqual as default };
//# sourceMappingURL=shallowEqual.js.map