@dxos/util 0.8.4-main.72ec0f3 → 0.8.4-main.7ace549

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.
@@ -2152,6 +2152,10 @@ var Unit = {
2152
2152
  quotient: 1e3,
2153
2153
  precision: 2
2154
2154
  }),
2155
+ Byte: createFormat({
2156
+ symbol: "B",
2157
+ quotient: 1
2158
+ }),
2155
2159
  // Time.
2156
2160
  Hour: createFormat({
2157
2161
  symbol: "h",
@@ -2309,6 +2313,21 @@ var WeakDictionary = class {
2309
2313
  this._finalization.unregister(value);
2310
2314
  }
2311
2315
  };
2316
+
2317
+ // src/error-format.ts
2318
+ var formatErrorWithCauses = (error) => {
2319
+ const lines = [];
2320
+ let current = error;
2321
+ let level = 0;
2322
+ while (current) {
2323
+ const prefix = level === 0 ? "" : `Caused by: `;
2324
+ lines.push(prefix + (current.stack ?? String(current)));
2325
+ if (!(current.cause instanceof Error)) break;
2326
+ current = current.cause;
2327
+ level += 1;
2328
+ }
2329
+ return lines.join("\n\n");
2330
+ };
2312
2331
  export {
2313
2332
  BitField,
2314
2333
  Callback,
@@ -2361,6 +2380,7 @@ export {
2361
2380
  entry,
2362
2381
  exponentialBackoffInterval,
2363
2382
  forEachAsync,
2383
+ formatErrorWithCauses,
2364
2384
  get,
2365
2385
  getAsyncProviderValue,
2366
2386
  getDate,