mol_jsx_lib 0.0.113 → 0.0.116

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/node.js CHANGED
@@ -2145,6 +2145,30 @@ var $;
2145
2145
  ;
2146
2146
  "use strict";
2147
2147
  var $;
2148
+ (function ($) {
2149
+ function $mol_wire_race(...tasks) {
2150
+ const results = tasks.map(task => {
2151
+ try {
2152
+ return task();
2153
+ }
2154
+ catch (error) {
2155
+ return error;
2156
+ }
2157
+ });
2158
+ const promises = results.filter(res => res instanceof Promise);
2159
+ if (promises.length)
2160
+ $mol_fail(Promise.race(promises));
2161
+ const error = results.find(res => res instanceof Error);
2162
+ if (error)
2163
+ $mol_fail(error);
2164
+ return results;
2165
+ }
2166
+ $.$mol_wire_race = $mol_wire_race;
2167
+ })($ || ($ = {}));
2168
+ //mol/wire/race/race.ts
2169
+ ;
2170
+ "use strict";
2171
+ var $;
2148
2172
  (function ($) {
2149
2173
  function $mol_wire_patch(obj) {
2150
2174
  for (const field of Reflect.ownKeys(obj)) {