UNPKG

372 BJavaScriptView Raw
1/**
2 * Compare two records with primitive values as the content.
3 */
4export default function isRecordEqual(a, b) {
5 if (a === b) {
6 return true;
7 }
8
9 const aKeys = Object.keys(a);
10 const bKeys = Object.keys(b);
11
12 if (aKeys.length !== bKeys.length) {
13 return false;
14 }
15
16 return aKeys.every(key => a[key] === b[key]);
17}
18//# sourceMappingURL=isRecordEqual.js.map
\No newline at end of file