qznt 2.0.0 → 2.0.1
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/index.cjs +5 -2
- package/dist/index.js +5 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -163,7 +163,10 @@ var Loop = class extends TypedEmitterBase {
|
|
|
163
163
|
const result = await this.fn(this);
|
|
164
164
|
this.emit("tick", result);
|
|
165
165
|
} catch (err) {
|
|
166
|
-
|
|
166
|
+
try {
|
|
167
|
+
this.emit("error", err);
|
|
168
|
+
} catch {
|
|
169
|
+
}
|
|
167
170
|
}
|
|
168
171
|
if (this._state === "running") {
|
|
169
172
|
this.startTime = Date.now();
|
|
@@ -470,7 +473,7 @@ function rndString(len, mode, options = {}) {
|
|
|
470
473
|
return result.join("");
|
|
471
474
|
}
|
|
472
475
|
|
|
473
|
-
// src/
|
|
476
|
+
// src/array.ts
|
|
474
477
|
function chunk(array, size) {
|
|
475
478
|
if (size <= 0) throw new Error("chunk: Size must be a positive integer.");
|
|
476
479
|
const result = [];
|
package/dist/index.js
CHANGED
|
@@ -63,7 +63,10 @@ var Loop = class extends TypedEmitterBase {
|
|
|
63
63
|
const result = await this.fn(this);
|
|
64
64
|
this.emit("tick", result);
|
|
65
65
|
} catch (err) {
|
|
66
|
-
|
|
66
|
+
try {
|
|
67
|
+
this.emit("error", err);
|
|
68
|
+
} catch {
|
|
69
|
+
}
|
|
67
70
|
}
|
|
68
71
|
if (this._state === "running") {
|
|
69
72
|
this.startTime = Date.now();
|
|
@@ -370,7 +373,7 @@ function rndString(len, mode, options = {}) {
|
|
|
370
373
|
return result.join("");
|
|
371
374
|
}
|
|
372
375
|
|
|
373
|
-
// src/
|
|
376
|
+
// src/array.ts
|
|
374
377
|
function chunk(array, size) {
|
|
375
378
|
if (size <= 0) throw new Error("chunk: Size must be a positive integer.");
|
|
376
379
|
const result = [];
|