rsnext/lib/shallow-equals.js

12 lines
194 B
JavaScript
Raw Normal View History

2016-10-06 01:52:50 +02:00
export default function shallowEquals (a, b) {
for (const i in a) {
if (b[i] !== a[i]) return false;
}
for (const i in b) {
if (b[i] !== a[i]) return false;
}
return true;
}