@dxos/util 0.8.4-main.c85a9c8dae → 0.8.4-main.dd46787728

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.
Files changed (86) hide show
  1. package/dist/lib/browser/index.mjs +208 -127
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node-esm/index.mjs +208 -127
  5. package/dist/lib/node-esm/index.mjs.map +4 -4
  6. package/dist/lib/node-esm/meta.json +1 -1
  7. package/dist/types/src/array-to-hex.d.ts.map +1 -1
  8. package/dist/types/src/array.d.ts.map +1 -1
  9. package/dist/types/src/binder.d.ts.map +1 -1
  10. package/dist/types/src/bitfield.d.ts.map +1 -1
  11. package/dist/types/src/browser-storage.d.ts +9 -0
  12. package/dist/types/src/browser-storage.d.ts.map +1 -0
  13. package/dist/types/src/callback-collection.d.ts.map +1 -1
  14. package/dist/types/src/callback.d.ts.map +1 -1
  15. package/dist/types/src/case.d.ts.map +1 -1
  16. package/dist/types/src/chunk-array.d.ts.map +1 -1
  17. package/dist/types/src/circular-buffer.d.ts.map +1 -1
  18. package/dist/types/src/clear-undefined.d.ts.map +1 -1
  19. package/dist/types/src/complex.d.ts +15 -0
  20. package/dist/types/src/complex.d.ts.map +1 -1
  21. package/dist/types/src/composite-key.d.ts +10 -0
  22. package/dist/types/src/composite-key.d.ts.map +1 -0
  23. package/dist/types/src/composite-key.test.d.ts +2 -0
  24. package/dist/types/src/composite-key.test.d.ts.map +1 -0
  25. package/dist/types/src/deep.d.ts.map +1 -1
  26. package/dist/types/src/defer-function.d.ts.map +1 -1
  27. package/dist/types/src/defer.d.ts.map +1 -1
  28. package/dist/types/src/di-container.d.ts.map +1 -1
  29. package/dist/types/src/di-key.d.ts +7 -5
  30. package/dist/types/src/di-key.d.ts.map +1 -1
  31. package/dist/types/src/entry.d.ts.map +1 -1
  32. package/dist/types/src/error-format.d.ts.map +1 -1
  33. package/dist/types/src/filename.d.ts.map +1 -1
  34. package/dist/types/src/for-each-async.d.ts.map +1 -1
  35. package/dist/types/src/human-hash.d.ts.map +1 -1
  36. package/dist/types/src/index.d.ts +4 -2
  37. package/dist/types/src/index.d.ts.map +1 -1
  38. package/dist/types/src/instance-id.d.ts.map +1 -1
  39. package/dist/types/src/interval.d.ts.map +1 -1
  40. package/dist/types/src/join-tables.d.ts.map +1 -1
  41. package/dist/types/src/json.d.ts.map +1 -1
  42. package/dist/types/src/map-values.d.ts.map +1 -1
  43. package/dist/types/src/map.d.ts.map +1 -1
  44. package/dist/types/src/object.d.ts.map +1 -1
  45. package/dist/types/src/order-keys.d.ts.map +1 -1
  46. package/dist/types/src/order.d.ts.map +1 -1
  47. package/dist/types/src/pick.d.ts.map +1 -1
  48. package/dist/types/src/platform.d.ts +1 -1
  49. package/dist/types/src/position.d.ts +1 -1
  50. package/dist/types/src/position.d.ts.map +1 -1
  51. package/dist/types/src/random.d.ts.map +1 -1
  52. package/dist/types/src/range.d.ts.map +1 -1
  53. package/dist/types/src/reducers.d.ts.map +1 -1
  54. package/dist/types/src/remove-undefined-keys.d.ts.map +1 -1
  55. package/dist/types/src/retry.d.ts.map +1 -1
  56. package/dist/types/src/safe-await.d.ts.map +1 -1
  57. package/dist/types/src/safe-instanceof.d.ts.map +1 -1
  58. package/dist/types/src/safe-parse.d.ts.map +1 -1
  59. package/dist/types/src/safe-stringify.d.ts.map +1 -1
  60. package/dist/types/src/sliding-window-summary.d.ts.map +1 -1
  61. package/dist/types/src/sort.d.ts.map +1 -1
  62. package/dist/types/src/string.d.ts.map +1 -1
  63. package/dist/types/src/sum.d.ts.map +1 -1
  64. package/dist/types/src/throw-unhandled-error.d.ts.map +1 -1
  65. package/dist/types/src/to-fallback.d.ts +4 -4
  66. package/dist/types/src/to-fallback.d.ts.map +1 -1
  67. package/dist/types/src/tracer.d.ts.map +1 -1
  68. package/dist/types/src/tree.d.ts.map +1 -1
  69. package/dist/types/src/types.d.ts.map +1 -1
  70. package/dist/types/src/uint8array.d.ts.map +1 -1
  71. package/dist/types/src/unit.d.ts.map +1 -1
  72. package/dist/types/src/url.d.ts.map +1 -1
  73. package/dist/types/src/weak.d.ts +15 -0
  74. package/dist/types/src/weak.d.ts.map +1 -1
  75. package/dist/types/tsconfig.tsbuildinfo +1 -1
  76. package/package.json +6 -9
  77. package/src/browser-storage.ts +60 -0
  78. package/src/complex.ts +32 -0
  79. package/src/composite-key.test.ts +31 -0
  80. package/src/composite-key.ts +16 -0
  81. package/src/di-key.ts +10 -8
  82. package/src/error-format.ts +3 -1
  83. package/src/index.ts +4 -2
  84. package/src/string.ts +6 -2
  85. package/src/unit.ts +6 -2
  86. package/src/weak.ts +52 -14
@@ -119,7 +119,6 @@ var createBinder = (obj) => ({
119
119
 
120
120
  // src/bitfield.ts
121
121
  import { invariant } from "@dxos/invariant";
122
- var __dxlog_file = "/__w/dxos/dxos/packages/common/util/src/bitfield.ts";
123
122
  var BitField = class _BitField {
124
123
  static get(data, idx) {
125
124
  const bit = data[idx >> 3] >> 7 - idx % 8 & 1;
@@ -151,15 +150,7 @@ var BitField = class _BitField {
151
150
  return result;
152
151
  }
153
152
  static and(first, second) {
154
- invariant(first.length === second.length, "Bitfields must be of the same length", {
155
- F: __dxlog_file,
156
- L: 52,
157
- S: this,
158
- A: [
159
- "first.length === second.length",
160
- "'Bitfields must be of the same length'"
161
- ]
162
- });
153
+ invariant(first.length === second.length, "Bitfields must be of the same length");
163
154
  const result = new Uint8Array(first.length);
164
155
  for (let i = 0; i < first.length; i++) {
165
156
  result[i] = first[i] & second[i];
@@ -187,6 +178,49 @@ var BitField = class _BitField {
187
178
  }
188
179
  };
189
180
 
181
+ // src/browser-storage.ts
182
+ var clearIndexedDB = async () => {
183
+ const dbs = await indexedDB.databases();
184
+ const results = await Promise.allSettled(dbs.filter((db) => db.name != null).map((db) => new Promise((resolve, reject) => {
185
+ const request = indexedDB.deleteDatabase(db.name);
186
+ request.onsuccess = () => resolve();
187
+ request.onerror = () => reject(request.error);
188
+ request.onblocked = () => reject(new Error(`IndexedDB deletion blocked: ${db.name}`));
189
+ })));
190
+ const failures = results.filter((r) => r.status === "rejected");
191
+ if (failures.length > 0) {
192
+ throw new AggregateError(failures.map((r) => r.reason), "Failed to delete some IndexedDB databases");
193
+ }
194
+ };
195
+ var clearOPFS = async () => {
196
+ const root = await navigator.storage.getDirectory();
197
+ const errors = [];
198
+ for await (const [name] of root.entries()) {
199
+ try {
200
+ await root.removeEntry(name, {
201
+ recursive: true
202
+ });
203
+ } catch (err) {
204
+ errors.push(err);
205
+ }
206
+ }
207
+ if (errors.length > 0) {
208
+ throw new AggregateError(errors, "Failed to remove some OPFS entries");
209
+ }
210
+ };
211
+ var clearServiceWorkers = async () => {
212
+ const regs = await navigator.serviceWorker.getRegistrations();
213
+ for (const reg of regs) {
214
+ await reg.unregister();
215
+ }
216
+ };
217
+ var clearCaches = async () => {
218
+ const keys2 = await caches.keys();
219
+ for (const key of keys2) {
220
+ await caches.delete(key);
221
+ }
222
+ };
223
+
190
224
  // src/callback-collection.ts
191
225
  var CallbackCollection = class {
192
226
  #callbacks = [];
@@ -213,34 +247,17 @@ var CallbackCollection = class {
213
247
 
214
248
  // src/callback.ts
215
249
  import { invariant as invariant2 } from "@dxos/invariant";
216
- var __dxlog_file2 = "/__w/dxos/dxos/packages/common/util/src/callback.ts";
217
250
  var Callback = class {
218
251
  _callback;
219
252
  call(...args) {
220
- invariant2(this._callback, "Callback not set", {
221
- F: __dxlog_file2,
222
- L: 20,
223
- S: this,
224
- A: [
225
- "this._callback",
226
- "'Callback not set'"
227
- ]
228
- });
253
+ invariant2(this._callback, "Callback not set");
229
254
  return this._callback(...args);
230
255
  }
231
256
  callIfSet(...args) {
232
257
  return this._callback?.(...args);
233
258
  }
234
259
  set(callback) {
235
- invariant2(!this._callback, "Callback already set", {
236
- F: __dxlog_file2,
237
- L: 29,
238
- S: this,
239
- A: [
240
- "!this._callback",
241
- "'Callback already set'"
242
- ]
243
- });
260
+ invariant2(!this._callback, "Callback already set");
244
261
  this._callback = callback;
245
262
  }
246
263
  isSet() {
@@ -308,21 +325,12 @@ var chunkArray = (array, size) => {
308
325
 
309
326
  // src/circular-buffer.ts
310
327
  import { invariant as invariant3 } from "@dxos/invariant";
311
- var __dxlog_file3 = "/__w/dxos/dxos/packages/common/util/src/circular-buffer.ts";
312
328
  var CircularBuffer = class {
313
329
  _buffer;
314
330
  _nextIndex = 0;
315
331
  _elementCount = 0;
316
332
  constructor(size) {
317
- invariant3(size >= 1, void 0, {
318
- F: __dxlog_file3,
319
- L: 13,
320
- S: this,
321
- A: [
322
- "size >= 1",
323
- ""
324
- ]
325
- });
333
+ invariant3(size >= 1);
326
334
  this._buffer = new Array(size);
327
335
  }
328
336
  push(element) {
@@ -532,6 +540,36 @@ var ComplexMap = class _ComplexMap {
532
540
  this._values.set(primitive, value);
533
541
  return this;
534
542
  }
543
+ /**
544
+ * Returns the value for the given key if present, otherwise inserts and returns the default value.
545
+ * @param key - The key to look up or insert.
546
+ * @param defaultValue - The value to insert if the key is not present.
547
+ * @returns The existing or newly inserted value.
548
+ */
549
+ getOrInsert(key, defaultValue) {
550
+ const primitive = this._keyProjection(key);
551
+ if (this._values.has(primitive)) {
552
+ return this._values.get(primitive);
553
+ }
554
+ this.set(key, defaultValue);
555
+ return defaultValue;
556
+ }
557
+ /**
558
+ * Returns the value for the given key if present, otherwise computes, inserts, and returns a new value.
559
+ * The callback is only invoked when the key is missing.
560
+ * @param key - The key to look up or insert.
561
+ * @param callbackfn - Function to compute the value if the key is not present.
562
+ * @returns The existing or newly computed value.
563
+ */
564
+ getOrInsertComputed(key, callbackfn) {
565
+ const primitive = this._keyProjection(key);
566
+ if (this._values.has(primitive)) {
567
+ return this._values.get(primitive);
568
+ }
569
+ const value = callbackfn(key);
570
+ this.set(key, value);
571
+ return value;
572
+ }
535
573
  get size() {
536
574
  return this._keys.size;
537
575
  }
@@ -571,19 +609,15 @@ var makeMap = (keyProjection) => class BoundComplexMap extends ComplexMap {
571
609
  }
572
610
  };
573
611
 
612
+ // src/composite-key.ts
613
+ var SEPARATOR = ":";
614
+ var compositeKey = (...parts) => parts.join(SEPARATOR);
615
+ var splitCompositeKey = (key) => key.split(SEPARATOR);
616
+
574
617
  // src/deep.ts
575
618
  import { invariant as invariant4 } from "@dxos/invariant";
576
- var __dxlog_file4 = "/__w/dxos/dxos/packages/common/util/src/deep.ts";
577
619
  var setDeep = (obj, path, value) => {
578
- invariant4(path.length > 0, void 0, {
579
- F: __dxlog_file4,
580
- L: 12,
581
- S: void 0,
582
- A: [
583
- "path.length > 0",
584
- ""
585
- ]
586
- });
620
+ invariant4(path.length > 0);
587
621
  let parent = obj;
588
622
  for (const key of path.slice(0, -1)) {
589
623
  if (parent[key] === void 0) {
@@ -668,6 +702,23 @@ var MapEntry = class {
668
702
  }
669
703
  };
670
704
 
705
+ // src/error-format.ts
706
+ var formatErrorWithCauses = (error) => {
707
+ const lines = [];
708
+ let current = error;
709
+ let level = 0;
710
+ while (current) {
711
+ const prefix = level === 0 ? "" : `Caused by: `;
712
+ lines.push(prefix + (current.stack ?? String(current)));
713
+ if (!(current.cause instanceof Error)) {
714
+ break;
715
+ }
716
+ current = current.cause;
717
+ level += 1;
718
+ }
719
+ return lines.join("\n\n");
720
+ };
721
+
671
722
  // src/filename.ts
672
723
  var createFilename = ({ parts = [], ext, date = /* @__PURE__ */ new Date() }) => [
673
724
  date.toISOString().replace(/[:.]/g, "-"),
@@ -1578,6 +1629,43 @@ var removeProperties = (root, condition) => {
1578
1629
  return result;
1579
1630
  };
1580
1631
 
1632
+ // src/retry.ts
1633
+ var DEFAULT_RETRY_OPTIONS = {
1634
+ count: 3,
1635
+ delayMs: 100,
1636
+ exponent: 2,
1637
+ retryOnError: async () => true,
1638
+ retryOnValue: async () => false
1639
+ };
1640
+ var retry = async (options, cb) => {
1641
+ const fullOptions = {
1642
+ ...DEFAULT_RETRY_OPTIONS,
1643
+ ...options
1644
+ };
1645
+ let numRetries = 0, currentDelay = fullOptions.delayMs;
1646
+ while (true) {
1647
+ let result;
1648
+ try {
1649
+ result = await cb();
1650
+ } catch (err) {
1651
+ if (numRetries > fullOptions.count || !await fullOptions.retryOnError(err)) {
1652
+ throw err;
1653
+ }
1654
+ await new Promise((resolve) => setTimeout(resolve, currentDelay));
1655
+ currentDelay *= fullOptions.exponent;
1656
+ numRetries++;
1657
+ continue;
1658
+ }
1659
+ if (!await fullOptions.retryOnValue(result)) {
1660
+ return result;
1661
+ }
1662
+ await new Promise((resolve) => setTimeout(resolve, currentDelay));
1663
+ currentDelay *= fullOptions.exponent;
1664
+ numRetries++;
1665
+ continue;
1666
+ }
1667
+ };
1668
+
1581
1669
  // src/safe-await.ts
1582
1670
  var safeAwaitAll = async (source, taskFactory, onError) => {
1583
1671
  const failedItems = [];
@@ -1734,7 +1822,6 @@ var defaultFilter = createReplacer();
1734
1822
 
1735
1823
  // src/sliding-window-summary.ts
1736
1824
  import { invariant as invariant5 } from "@dxos/invariant";
1737
- var __dxlog_file5 = "/__w/dxos/dxos/packages/common/util/src/sliding-window-summary.ts";
1738
1825
  var SlidingWindowSummary = class {
1739
1826
  _buffer;
1740
1827
  _sum = 0;
@@ -1742,15 +1829,7 @@ var SlidingWindowSummary = class {
1742
1829
  constructor(options) {
1743
1830
  this._buffer = new CircularBuffer(options.dataPoints);
1744
1831
  if (options.precision != null) {
1745
- invariant5(options.precision >= 0, void 0, {
1746
- F: __dxlog_file5,
1747
- L: 26,
1748
- S: this,
1749
- A: [
1750
- "options.precision >= 0",
1751
- ""
1752
- ]
1753
- });
1832
+ invariant5(options.precision >= 0);
1754
1833
  this._precision = Math.pow(10, options.precision);
1755
1834
  }
1756
1835
  }
@@ -1831,8 +1910,12 @@ function trim(strings, ...values) {
1831
1910
  return out;
1832
1911
  }, "");
1833
1912
  const lines = raw.split("\n");
1834
- while (lines.length && !lines[0].trim()) lines.shift();
1835
- while (lines.length && !lines[lines.length - 1].trim()) lines.pop();
1913
+ while (lines.length && !lines[0].trim()) {
1914
+ lines.shift();
1915
+ }
1916
+ while (lines.length && !lines[lines.length - 1].trim()) {
1917
+ lines.pop();
1918
+ }
1836
1919
  const minIndent = Math.min(...lines.filter((l) => l.trim()).map((l) => l.match(/^[ \t]*/)?.[0].length ?? 0));
1837
1920
  return lines.map((l) => l.slice(minIndent)).join("\n");
1838
1921
  }
@@ -2167,11 +2250,15 @@ function arraySwap(array, from, to) {
2167
2250
  var createFormat = (unit) => {
2168
2251
  return (n, precision = unit.precision ?? 0) => {
2169
2252
  const value = n / unit.quotient;
2253
+ const formattedValue = value.toLocaleString("en-US", {
2254
+ minimumFractionDigits: precision,
2255
+ maximumFractionDigits: precision
2256
+ });
2170
2257
  return {
2171
2258
  unit,
2172
2259
  value,
2173
- formattedValue: value.toFixed(precision),
2174
- toString: () => `${value.toFixed(precision)}${unit.symbol}`
2260
+ formattedValue,
2261
+ toString: () => `${formattedValue}${unit.symbol}`
2175
2262
  };
2176
2263
  };
2177
2264
  };
@@ -2276,15 +2363,19 @@ var createUrl = (url, search) => {
2276
2363
  // src/weak.ts
2277
2364
  var WeakDictionary = class {
2278
2365
  _internal = /* @__PURE__ */ new Map();
2279
- _finalization = new FinalizationRegistry((cleanUpCallback) => {
2280
- cleanUpCallback();
2366
+ _finalization = new FinalizationRegistry(({ key, ref }) => {
2367
+ if (this._internal.get(key) === ref) {
2368
+ this._internal.delete(key);
2369
+ }
2281
2370
  });
2282
2371
  constructor(entries2) {
2283
- this._internal = new Map(entries2?.map(([key, value]) => [
2284
- key,
2285
- new WeakRef(value)
2286
- ]));
2287
- entries2?.forEach(([key, value]) => this._register(key, value));
2372
+ if (entries2) {
2373
+ for (const [key, value] of entries2) {
2374
+ const ref = new WeakRef(value);
2375
+ this._internal.set(key, ref);
2376
+ this._register(key, value, ref);
2377
+ }
2378
+ }
2288
2379
  }
2289
2380
  *entries() {
2290
2381
  for (const [key, value] of this._internal) {
@@ -2324,10 +2415,45 @@ var WeakDictionary = class {
2324
2415
  return this._internal.get(key)?.deref();
2325
2416
  }
2326
2417
  set(key, value) {
2327
- this._internal.set(key, new WeakRef(value));
2328
- this._register(key, value);
2418
+ const previous = this._internal.get(key)?.deref();
2419
+ if (previous) {
2420
+ this._unregister(previous);
2421
+ }
2422
+ const ref = new WeakRef(value);
2423
+ this._internal.set(key, ref);
2424
+ this._register(key, value, ref);
2329
2425
  return this;
2330
2426
  }
2427
+ /**
2428
+ * Returns the value for the given key if present, otherwise inserts and returns the default value.
2429
+ * @param key - The key to look up or insert.
2430
+ * @param defaultValue - The value to insert if the key is not present.
2431
+ * @returns The existing or newly inserted value.
2432
+ */
2433
+ getOrInsert(key, defaultValue) {
2434
+ const existing = this.get(key);
2435
+ if (existing !== void 0) {
2436
+ return existing;
2437
+ }
2438
+ this.set(key, defaultValue);
2439
+ return defaultValue;
2440
+ }
2441
+ /**
2442
+ * Returns the value for the given key if present, otherwise computes, inserts, and returns a new value.
2443
+ * The callback is only invoked when the key is missing.
2444
+ * @param key - The key to look up or insert.
2445
+ * @param callbackfn - Function to compute the value if the key is not present.
2446
+ * @returns The existing or newly computed value.
2447
+ */
2448
+ getOrInsertComputed(key, callbackfn) {
2449
+ const existing = this.get(key);
2450
+ if (existing !== void 0) {
2451
+ return existing;
2452
+ }
2453
+ const value = callbackfn(key);
2454
+ this.set(key, value);
2455
+ return value;
2456
+ }
2331
2457
  has(key) {
2332
2458
  return this._internal.has(key) && this._internal.get(key).deref() !== void 0;
2333
2459
  }
@@ -2358,67 +2484,16 @@ var WeakDictionary = class {
2358
2484
  }
2359
2485
  });
2360
2486
  }
2361
- _register(key, value) {
2362
- this._finalization.register(value, () => {
2363
- this._internal.delete(key);
2487
+ _register(key, value, ref) {
2488
+ this._finalization.register(value, {
2489
+ key,
2490
+ ref
2364
2491
  }, value);
2365
2492
  }
2366
2493
  _unregister(value) {
2367
2494
  this._finalization.unregister(value);
2368
2495
  }
2369
2496
  };
2370
-
2371
- // src/error-format.ts
2372
- var formatErrorWithCauses = (error) => {
2373
- const lines = [];
2374
- let current = error;
2375
- let level = 0;
2376
- while (current) {
2377
- const prefix = level === 0 ? "" : `Caused by: `;
2378
- lines.push(prefix + (current.stack ?? String(current)));
2379
- if (!(current.cause instanceof Error)) break;
2380
- current = current.cause;
2381
- level += 1;
2382
- }
2383
- return lines.join("\n\n");
2384
- };
2385
-
2386
- // src/retry.ts
2387
- var DEFAULT_RETRY_OPTIONS = {
2388
- count: 3,
2389
- delayMs: 100,
2390
- exponent: 2,
2391
- retryOnError: async () => true,
2392
- retryOnValue: async () => false
2393
- };
2394
- var retry = async (options, cb) => {
2395
- const fullOptions = {
2396
- ...DEFAULT_RETRY_OPTIONS,
2397
- ...options
2398
- };
2399
- let numRetries = 0, currentDelay = fullOptions.delayMs;
2400
- while (true) {
2401
- let result;
2402
- try {
2403
- result = await cb();
2404
- } catch (err) {
2405
- if (numRetries > fullOptions.count || !await fullOptions.retryOnError(err)) {
2406
- throw err;
2407
- }
2408
- await new Promise((resolve) => setTimeout(resolve, currentDelay));
2409
- currentDelay *= fullOptions.exponent;
2410
- numRetries++;
2411
- continue;
2412
- }
2413
- if (!await fullOptions.retryOnValue(result)) {
2414
- return result;
2415
- }
2416
- await new Promise((resolve) => setTimeout(resolve, currentDelay));
2417
- currentDelay *= fullOptions.exponent;
2418
- numRetries++;
2419
- continue;
2420
- }
2421
- };
2422
2497
  export {
2423
2498
  BitField,
2424
2499
  Callback,
@@ -2446,12 +2521,17 @@ export {
2446
2521
  capitalize,
2447
2522
  chunkArray,
2448
2523
  clamp,
2524
+ clearCaches,
2525
+ clearIndexedDB,
2526
+ clearOPFS,
2527
+ clearServiceWorkers,
2449
2528
  clearUndefined,
2450
2529
  coerceArray,
2451
2530
  compareMulti,
2452
2531
  compareObject,
2453
2532
  compareScalar,
2454
2533
  compareString,
2534
+ compositeKey,
2455
2535
  createBinder,
2456
2536
  createBucketReducer,
2457
2537
  createFilename,
@@ -2541,6 +2621,7 @@ export {
2541
2621
  safeUrl,
2542
2622
  setDeep,
2543
2623
  sortKeys,
2624
+ splitCompositeKey,
2544
2625
  stringToArray,
2545
2626
  stringifyTree,
2546
2627
  stripUndefined,