@whatwg-node/promise-helpers 1.2.0 → 1.2.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/cjs/index.js +3 -3
- package/esm/index.js +3 -3
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -99,12 +99,12 @@ function iterateAsync(iterable, callback, results) {
|
|
|
99
99
|
endedEarly = true;
|
|
100
100
|
}
|
|
101
101
|
return handleMaybePromise(() => callback(value, endEarly, index++), result => {
|
|
102
|
-
if (endedEarly) {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
102
|
if (result) {
|
|
106
103
|
results?.push(result);
|
|
107
104
|
}
|
|
105
|
+
if (endedEarly) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
108
|
return iterate();
|
|
109
109
|
});
|
|
110
110
|
}
|
package/esm/index.js
CHANGED
|
@@ -89,12 +89,12 @@ export function iterateAsync(iterable, callback, results) {
|
|
|
89
89
|
endedEarly = true;
|
|
90
90
|
}
|
|
91
91
|
return handleMaybePromise(() => callback(value, endEarly, index++), result => {
|
|
92
|
-
if (endedEarly) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
92
|
if (result) {
|
|
96
93
|
results?.push(result);
|
|
97
94
|
}
|
|
95
|
+
if (endedEarly) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
98
|
return iterate();
|
|
99
99
|
});
|
|
100
100
|
}
|