@gabrielrufino/cube 1.0.15 → 1.0.16

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.
@@ -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
- if (type === 'string') {
123
- return "{ ".concat(this.data.join(', '), " }");
124
- }
125
- if (type === 'number') {
126
- return this.size;
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gabrielrufino/cube",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "Data Structures and Algorithms made in Typescript",
5
5
  "main": "build/index.js",
6
6
  "scripts": {