greybel-interpreter 1.3.4 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/utils/deep-equal.js +3 -8
- package/package.json +1 -1
package/dist/utils/deep-equal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
var __values = (this && this.__values) || function(o) {
|
|
3
3
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
4
4
|
if (m) return m.call(o);
|
|
@@ -10,13 +10,8 @@ var __values = (this && this.__values) || function(o) {
|
|
|
10
10
|
};
|
|
11
11
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
12
12
|
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
14
|
var generics_1 = require("../types/generics");
|
|
18
|
-
var list_1 = __importDefault(require("../types/list"));
|
|
19
|
-
var map_1 = __importDefault(require("../types/map"));
|
|
20
15
|
function equalInner(a, b, maxDepth, depth) {
|
|
21
16
|
var e_1, _a;
|
|
22
17
|
if (depth === void 0) { depth = 0; }
|
|
@@ -27,7 +22,7 @@ function equalInner(a, b, maxDepth, depth) {
|
|
|
27
22
|
if (a && b && a instanceof generics_1.CustomObject && b instanceof generics_1.CustomObject) {
|
|
28
23
|
if (a.constructor !== b.constructor)
|
|
29
24
|
return false;
|
|
30
|
-
if (a
|
|
25
|
+
if (Array.isArray(a.value)) {
|
|
31
26
|
var length = a.value.length;
|
|
32
27
|
if (length !== b.value.length)
|
|
33
28
|
return false;
|
|
@@ -36,7 +31,7 @@ function equalInner(a, b, maxDepth, depth) {
|
|
|
36
31
|
return false;
|
|
37
32
|
return true;
|
|
38
33
|
}
|
|
39
|
-
if (a
|
|
34
|
+
if (a.value instanceof Map) {
|
|
40
35
|
if (a.value.size !== b.value.size)
|
|
41
36
|
return false;
|
|
42
37
|
try {
|