@gabrielrufino/cube 1.0.30 → 1.0.31

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.
@@ -134,9 +134,9 @@ var Graph = /** @class */ (function () {
134
134
  var queue = new Queue_1.default();
135
135
  queue.enqueue(startNode);
136
136
  while (!queue.isEmpty) {
137
- var current = queue.dequeue() || '';
137
+ var current = queue.dequeue();
138
138
  states[current] = GraphSearchNodeStates_1.default.DISCOVERED;
139
- var neighbors = ((_a = this._data.get(current)) === null || _a === void 0 ? void 0 : _a.data) || [];
139
+ var neighbors = (_a = this._data.get(current)) === null || _a === void 0 ? void 0 : _a.data;
140
140
  var unexploredNeighbors = neighbors.filter(function (neighbor) { return states[neighbor] === GraphSearchNodeStates_1.default.UNEXPLORED; });
141
141
  for (var _i = 0, unexploredNeighbors_1 = unexploredNeighbors; _i < unexploredNeighbors_1.length; _i++) {
142
142
  var neighbor = unexploredNeighbors_1[_i];
@@ -164,9 +164,9 @@ var Graph = /** @class */ (function () {
164
164
  var queue = new Queue_1.default();
165
165
  queue.enqueue(node);
166
166
  while (!queue.isEmpty) {
167
- var current = queue.dequeue() || '';
167
+ var current = queue.dequeue();
168
168
  states[current] = GraphSearchNodeStates_1.default.DISCOVERED;
169
- var neighbors = ((_a = this._data.get(current)) === null || _a === void 0 ? void 0 : _a.data) || [];
169
+ var neighbors = (_a = this._data.get(current)) === null || _a === void 0 ? void 0 : _a.data;
170
170
  var unexploredNeighbors = neighbors.filter(function (neighbor) { return states[neighbor] === GraphSearchNodeStates_1.default.UNEXPLORED; });
171
171
  for (var _i = 0, unexploredNeighbors_2 = unexploredNeighbors; _i < unexploredNeighbors_2.length; _i++) {
172
172
  var neighbor = unexploredNeighbors_2[_i];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gabrielrufino/cube",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "Data Structures and Algorithms made in Typescript",
5
5
  "main": "build/index.js",
6
6
  "scripts": {