@gabrielrufino/cube 1.0.15 → 1.0.18
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/build/Deck/index.js +6 -7
- package/build/Queue/index.js +6 -7
- package/build/Set/index.js +6 -7
- package/build/Stack/index.js +6 -7
- package/package.json +1 -1
package/build/Deck/index.js
CHANGED
|
@@ -63,13 +63,12 @@ var Deck = /** @class */ (function (_super) {
|
|
|
63
63
|
return element;
|
|
64
64
|
};
|
|
65
65
|
Deck.prototype[Symbol.toPrimitive] = function (type) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return null;
|
|
66
|
+
var primitives = {
|
|
67
|
+
number: this.size,
|
|
68
|
+
string: "[Front] ".concat(this.data.join(', '), " [Back]"),
|
|
69
|
+
default: true,
|
|
70
|
+
};
|
|
71
|
+
return primitives[type];
|
|
73
72
|
};
|
|
74
73
|
return Deck;
|
|
75
74
|
}(DataStructure_1.default));
|
package/build/Queue/index.js
CHANGED
|
@@ -61,13 +61,12 @@ var Queue = /** @class */ (function (_super) {
|
|
|
61
61
|
this._data = [];
|
|
62
62
|
};
|
|
63
63
|
Queue.prototype[Symbol.toPrimitive] = function (type) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return null;
|
|
64
|
+
var primitives = {
|
|
65
|
+
default: true,
|
|
66
|
+
number: this.size,
|
|
67
|
+
string: "[Front] ".concat(this.data.join(', ')),
|
|
68
|
+
};
|
|
69
|
+
return primitives[type];
|
|
71
70
|
};
|
|
72
71
|
return Queue;
|
|
73
72
|
}(DataStructure_1.default));
|
package/build/Set/index.js
CHANGED
|
@@ -119,13 +119,12 @@ var Set = /** @class */ (function () {
|
|
|
119
119
|
.every(function (element) { return set2.has(element); });
|
|
120
120
|
};
|
|
121
121
|
Set.prototype[Symbol.toPrimitive] = function (type) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
return null;
|
|
122
|
+
var primitives = {
|
|
123
|
+
number: this.size,
|
|
124
|
+
string: "{ ".concat(this.data.join(', '), " }"),
|
|
125
|
+
default: true,
|
|
126
|
+
};
|
|
127
|
+
return primitives[type];
|
|
129
128
|
};
|
|
130
129
|
return Set;
|
|
131
130
|
}());
|
package/build/Stack/index.js
CHANGED
|
@@ -51,13 +51,12 @@ var Stack = /** @class */ (function (_super) {
|
|
|
51
51
|
configurable: true
|
|
52
52
|
});
|
|
53
53
|
Stack.prototype[Symbol.toPrimitive] = function (type) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return null;
|
|
54
|
+
var primitives = {
|
|
55
|
+
default: true,
|
|
56
|
+
number: this.size,
|
|
57
|
+
string: "".concat(this.data.join(', '), " [Top]"),
|
|
58
|
+
};
|
|
59
|
+
return primitives[type];
|
|
61
60
|
};
|
|
62
61
|
return Stack;
|
|
63
62
|
}(DataStructure_1.default));
|