1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = isRecordEqual;
|
7 |
|
8 | /**
|
9 | * Compare two records with primitive values as the content.
|
10 | */
|
11 | function isRecordEqual(a, b) {
|
12 | if (a === b) {
|
13 | return true;
|
14 | }
|
15 |
|
16 | const aKeys = Object.keys(a);
|
17 | const bKeys = Object.keys(b);
|
18 |
|
19 | if (aKeys.length !== bKeys.length) {
|
20 | return false;
|
21 | }
|
22 |
|
23 | return aKeys.every(key => a[key] === b[key]);
|
24 | }
|
25 | //# sourceMappingURL=isRecordEqual.js.map |
\ | No newline at end of file |