Some checks failed
CI/CD Pipeline / unit-tests (push) Failing after 1m16s
CI/CD Pipeline / integration-tests (push) Failing after 2m32s
CI/CD Pipeline / lint (push) Successful in 5m22s
CI/CD Pipeline / e2e-tests (push) Has been skipped
CI/CD Pipeline / build (push) Has been skipped
14 lines
383 B
JavaScript
14 lines
383 B
JavaScript
export function shallowEqual(a, b) {
|
|
/* eslint-disable no-restricted-syntax */
|
|
for (var key in a) {
|
|
if ({}.hasOwnProperty.call(a, key) && (!{}.hasOwnProperty.call(b, key) || a[key] !== b[key])) {
|
|
return false;
|
|
}
|
|
}
|
|
for (var _key in b) {
|
|
if ({}.hasOwnProperty.call(b, _key) && !{}.hasOwnProperty.call(a, _key)) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
} |