@punks/backend-core 0.0.26 → 0.0.27
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/cjs/index.js
CHANGED
|
@@ -332,10 +332,10 @@ function sleep(ms) {
|
|
|
332
332
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
const mapOrThrow = (
|
|
336
|
-
const output = mapper(
|
|
335
|
+
const mapOrThrow = ({ mapper, throw: throwFn, }) => {
|
|
336
|
+
const output = mapper();
|
|
337
337
|
if (!output) {
|
|
338
|
-
return throwFn(
|
|
338
|
+
return throwFn();
|
|
339
339
|
}
|
|
340
340
|
return output;
|
|
341
341
|
};
|