tinybase 8.4.2 → 8.5.0-beta.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.
Files changed (141) hide show
  1. package/@types/ui-react-dom/index.d.ts +10 -10
  2. package/@types/ui-react-dom/with-schemas/index.d.ts +10 -10
  3. package/@types/ui-react-dom-charts/index.d.ts +242 -0
  4. package/@types/ui-react-dom-charts/with-schemas/index.d.ts +296 -0
  5. package/@types/ui-react-inspector/index.d.ts +1 -1
  6. package/@types/ui-react-inspector/with-schemas/index.d.ts +1 -1
  7. package/@types/ui-solid-dom/index.d.ts +10 -10
  8. package/@types/ui-solid-dom/with-schemas/index.d.ts +10 -10
  9. package/@types/ui-solid-inspector/index.d.ts +1 -1
  10. package/@types/ui-solid-inspector/with-schemas/index.d.ts +1 -1
  11. package/@types/ui-svelte-dom/index.d.ts +10 -10
  12. package/@types/ui-svelte-dom/with-schemas/index.d.ts +10 -10
  13. package/@types/ui-svelte-inspector/index.d.ts +1 -1
  14. package/@types/ui-svelte-inspector/with-schemas/index.d.ts +1 -1
  15. package/common/index.js +3 -2
  16. package/common/with-schemas/index.js +3 -2
  17. package/index.js +5 -3
  18. package/mergeable-store/index.js +5 -3
  19. package/mergeable-store/with-schemas/index.js +5 -3
  20. package/metrics/index.js +1 -1
  21. package/metrics/with-schemas/index.js +1 -1
  22. package/min/common/index.js +1 -1
  23. package/min/common/index.js.gz +0 -0
  24. package/min/common/with-schemas/index.js +1 -1
  25. package/min/common/with-schemas/index.js.gz +0 -0
  26. package/min/index.js +1 -1
  27. package/min/index.js.gz +0 -0
  28. package/min/mergeable-store/index.js +1 -1
  29. package/min/mergeable-store/index.js.gz +0 -0
  30. package/min/mergeable-store/with-schemas/index.js +1 -1
  31. package/min/mergeable-store/with-schemas/index.js.gz +0 -0
  32. package/min/omni/index.js +1 -1
  33. package/min/omni/index.js.gz +0 -0
  34. package/min/omni/with-schemas/index.js +1 -1
  35. package/min/omni/with-schemas/index.js.gz +0 -0
  36. package/min/persisters/persister-durable-object-sql-storage/index.js +1 -1
  37. package/min/persisters/persister-durable-object-sql-storage/index.js.gz +0 -0
  38. package/min/persisters/persister-durable-object-sql-storage/with-schemas/index.js +1 -1
  39. package/min/persisters/persister-durable-object-sql-storage/with-schemas/index.js.gz +0 -0
  40. package/min/persisters/persister-partykit-server/index.js +1 -1
  41. package/min/persisters/persister-partykit-server/index.js.gz +0 -0
  42. package/min/persisters/persister-partykit-server/with-schemas/index.js +1 -1
  43. package/min/persisters/persister-partykit-server/with-schemas/index.js.gz +0 -0
  44. package/min/queries/index.js +1 -1
  45. package/min/queries/index.js.gz +0 -0
  46. package/min/queries/with-schemas/index.js +1 -1
  47. package/min/queries/with-schemas/index.js.gz +0 -0
  48. package/min/synchronizers/index.js +1 -1
  49. package/min/synchronizers/index.js.gz +0 -0
  50. package/min/synchronizers/synchronizer-broadcast-channel/index.js +1 -1
  51. package/min/synchronizers/synchronizer-broadcast-channel/index.js.gz +0 -0
  52. package/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +1 -1
  53. package/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js.gz +0 -0
  54. package/min/synchronizers/synchronizer-local/index.js +1 -1
  55. package/min/synchronizers/synchronizer-local/index.js.gz +0 -0
  56. package/min/synchronizers/synchronizer-local/with-schemas/index.js +1 -1
  57. package/min/synchronizers/synchronizer-local/with-schemas/index.js.gz +0 -0
  58. package/min/synchronizers/synchronizer-ws-client/index.js +1 -1
  59. package/min/synchronizers/synchronizer-ws-client/index.js.gz +0 -0
  60. package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js +1 -1
  61. package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js.gz +0 -0
  62. package/min/synchronizers/synchronizer-ws-server/index.js +1 -1
  63. package/min/synchronizers/synchronizer-ws-server/index.js.gz +0 -0
  64. package/min/synchronizers/synchronizer-ws-server/with-schemas/index.js +1 -1
  65. package/min/synchronizers/synchronizer-ws-server/with-schemas/index.js.gz +0 -0
  66. package/min/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
  67. package/min/synchronizers/synchronizer-ws-server-durable-object/index.js.gz +0 -0
  68. package/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
  69. package/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js.gz +0 -0
  70. package/min/synchronizers/with-schemas/index.js +1 -1
  71. package/min/synchronizers/with-schemas/index.js.gz +0 -0
  72. package/min/ui-react-dom/index.js +1 -1
  73. package/min/ui-react-dom/index.js.gz +0 -0
  74. package/min/ui-react-dom/with-schemas/index.js +1 -1
  75. package/min/ui-react-dom/with-schemas/index.js.gz +0 -0
  76. package/min/ui-react-dom-charts/index.js +1 -0
  77. package/min/ui-react-dom-charts/index.js.gz +0 -0
  78. package/min/ui-react-dom-charts/with-schemas/index.js +1 -0
  79. package/min/ui-react-dom-charts/with-schemas/index.js.gz +0 -0
  80. package/min/ui-react-inspector/index.js +1 -1
  81. package/min/ui-react-inspector/index.js.gz +0 -0
  82. package/min/ui-react-inspector/with-schemas/index.js +1 -1
  83. package/min/ui-react-inspector/with-schemas/index.js.gz +0 -0
  84. package/min/ui-solid-dom/index.js +1 -1
  85. package/min/ui-solid-dom/index.js.gz +0 -0
  86. package/min/ui-solid-dom/with-schemas/index.js +1 -1
  87. package/min/ui-solid-dom/with-schemas/index.js.gz +0 -0
  88. package/min/ui-solid-inspector/index.js +1 -1
  89. package/min/ui-solid-inspector/index.js.gz +0 -0
  90. package/min/ui-solid-inspector/with-schemas/index.js +1 -1
  91. package/min/ui-solid-inspector/with-schemas/index.js.gz +0 -0
  92. package/min/ui-svelte-dom/index.js +1 -1
  93. package/min/ui-svelte-dom/index.js.gz +0 -0
  94. package/min/ui-svelte-dom/with-schemas/index.js +1 -1
  95. package/min/ui-svelte-dom/with-schemas/index.js.gz +0 -0
  96. package/min/ui-svelte-inspector/index.js +1 -1
  97. package/min/ui-svelte-inspector/index.js.gz +0 -0
  98. package/min/ui-svelte-inspector/with-schemas/index.js +1 -1
  99. package/min/ui-svelte-inspector/with-schemas/index.js.gz +0 -0
  100. package/min/with-schemas/index.js +1 -1
  101. package/min/with-schemas/index.js.gz +0 -0
  102. package/omni/index.js +7 -4
  103. package/omni/with-schemas/index.js +7 -4
  104. package/package.json +38 -2
  105. package/persisters/persister-durable-object-sql-storage/index.js +13 -11
  106. package/persisters/persister-durable-object-sql-storage/with-schemas/index.js +13 -11
  107. package/persisters/persister-partykit-client/index.js +2 -1
  108. package/persisters/persister-partykit-client/with-schemas/index.js +2 -1
  109. package/persisters/persister-partykit-server/index.js +2 -1
  110. package/persisters/persister-partykit-server/with-schemas/index.js +2 -1
  111. package/queries/index.js +1 -1
  112. package/queries/with-schemas/index.js +1 -1
  113. package/readme.md +18 -14
  114. package/releases.md +91 -58
  115. package/synchronizers/index.js +3 -2
  116. package/synchronizers/synchronizer-broadcast-channel/index.js +3 -2
  117. package/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +3 -2
  118. package/synchronizers/synchronizer-local/index.js +3 -2
  119. package/synchronizers/synchronizer-local/with-schemas/index.js +3 -2
  120. package/synchronizers/synchronizer-ws-client/index.js +3 -2
  121. package/synchronizers/synchronizer-ws-client/with-schemas/index.js +3 -2
  122. package/synchronizers/synchronizer-ws-server/index.js +3 -2
  123. package/synchronizers/synchronizer-ws-server/with-schemas/index.js +3 -2
  124. package/synchronizers/synchronizer-ws-server-durable-object/index.js +3 -2
  125. package/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +3 -2
  126. package/synchronizers/with-schemas/index.js +3 -2
  127. package/ui-react-dom/index.js +10 -7
  128. package/ui-react-dom/with-schemas/index.js +10 -7
  129. package/ui-react-dom-charts/index.js +1229 -0
  130. package/ui-react-dom-charts/with-schemas/index.js +1229 -0
  131. package/ui-react-inspector/index.js +13 -9
  132. package/ui-react-inspector/with-schemas/index.js +13 -9
  133. package/ui-solid-dom/index.js +10 -7
  134. package/ui-solid-dom/with-schemas/index.js +10 -7
  135. package/ui-solid-inspector/index.js +13 -9
  136. package/ui-solid-inspector/with-schemas/index.js +13 -9
  137. package/ui-svelte-dom/index.js +11 -8
  138. package/ui-svelte-dom/with-schemas/index.js +11 -8
  139. package/ui-svelte-inspector/index.js +17 -13
  140. package/ui-svelte-inspector/with-schemas/index.js +17 -13
  141. package/with-schemas/index.js +5 -3
@@ -4,6 +4,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
4
4
  str.split(separator, limit);
5
5
 
6
6
  const promise = Promise;
7
+ const math = Math;
7
8
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
8
9
  predicate(value)
9
10
  ? /* istanbul ignore next */
@@ -13,8 +14,8 @@ const GLOBAL = globalThis;
13
14
  const THOUSAND = 1e3;
14
15
  const startTimeout = (callback, sec = 0) =>
15
16
  setTimeout(callback, sec * THOUSAND);
16
- const math = Math;
17
17
  const mathFloor = math.floor;
18
+ const mathRandom = math.random;
18
19
  const isNullish = (thing) => thing == null;
19
20
  const isUndefined = (thing) => thing === void 0;
20
21
  const isNull = (thing) => thing === null;
@@ -121,7 +122,7 @@ const encode = (num) => ENCODE[num & MASK6];
121
122
  const getRandomValues = GLOBAL.crypto
122
123
  ? (array) => GLOBAL.crypto.getRandomValues(array)
123
124
  : /* istanbul ignore next */
124
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
125
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
125
126
  const getUniqueId = (length = 16) =>
126
127
  arrayReduce(
127
128
  getRandomValues(new Uint8Array(length)),
@@ -4,6 +4,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
4
4
  str.split(separator, limit);
5
5
 
6
6
  const promise = Promise;
7
+ const math = Math;
7
8
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
8
9
  predicate(value)
9
10
  ? /* istanbul ignore next */
@@ -13,8 +14,8 @@ const GLOBAL = globalThis;
13
14
  const THOUSAND = 1e3;
14
15
  const startTimeout = (callback, sec = 0) =>
15
16
  setTimeout(callback, sec * THOUSAND);
16
- const math = Math;
17
17
  const mathFloor = math.floor;
18
+ const mathRandom = math.random;
18
19
  const isNullish = (thing) => thing == null;
19
20
  const isUndefined = (thing) => thing === void 0;
20
21
  const isNull = (thing) => thing === null;
@@ -121,7 +122,7 @@ const encode = (num) => ENCODE[num & MASK6];
121
122
  const getRandomValues = GLOBAL.crypto
122
123
  ? (array) => GLOBAL.crypto.getRandomValues(array)
123
124
  : /* istanbul ignore next */
124
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
125
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
125
126
  const getUniqueId = (length = 16) =>
126
127
  arrayReduce(
127
128
  getRandomValues(new Uint8Array(length)),
@@ -4,6 +4,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
4
4
  str.split(separator, limit);
5
5
 
6
6
  const promise = Promise;
7
+ const math = Math;
7
8
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
8
9
  predicate(value)
9
10
  ? /* istanbul ignore next */
@@ -13,8 +14,8 @@ const GLOBAL = globalThis;
13
14
  const THOUSAND = 1e3;
14
15
  const startTimeout = (callback, sec = 0) =>
15
16
  setTimeout(callback, sec * THOUSAND);
16
- const math = Math;
17
17
  const mathFloor = math.floor;
18
+ const mathRandom = math.random;
18
19
  const isNullish = (thing) => thing == null;
19
20
  const isUndefined = (thing) => thing === void 0;
20
21
  const isNull = (thing) => thing === null;
@@ -121,7 +122,7 @@ const encode = (num) => ENCODE[num & MASK6];
121
122
  const getRandomValues = GLOBAL.crypto
122
123
  ? (array) => GLOBAL.crypto.getRandomValues(array)
123
124
  : /* istanbul ignore next */
124
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
125
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
125
126
  const getUniqueId = (length = 16) =>
126
127
  arrayReduce(
127
128
  getRandomValues(new Uint8Array(length)),
@@ -4,6 +4,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
4
4
  str.split(separator, limit);
5
5
 
6
6
  const promise = Promise;
7
+ const math = Math;
7
8
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
8
9
  predicate(value)
9
10
  ? /* istanbul ignore next */
@@ -13,8 +14,8 @@ const GLOBAL = globalThis;
13
14
  const THOUSAND = 1e3;
14
15
  const startTimeout = (callback, sec = 0) =>
15
16
  setTimeout(callback, sec * THOUSAND);
16
- const math = Math;
17
17
  const mathFloor = math.floor;
18
+ const mathRandom = math.random;
18
19
  const isNullish = (thing) => thing == null;
19
20
  const isUndefined = (thing) => thing === void 0;
20
21
  const isNull = (thing) => thing === null;
@@ -123,7 +124,7 @@ const encode = (num) => ENCODE[num & MASK6];
123
124
  const getRandomValues = GLOBAL.crypto
124
125
  ? (array) => GLOBAL.crypto.getRandomValues(array)
125
126
  : /* istanbul ignore next */
126
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
127
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
127
128
  const getUniqueId = (length = 16) =>
128
129
  arrayReduce(
129
130
  getRandomValues(new Uint8Array(length)),
@@ -4,6 +4,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
4
4
  str.split(separator, limit);
5
5
 
6
6
  const promise = Promise;
7
+ const math = Math;
7
8
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
8
9
  predicate(value)
9
10
  ? /* istanbul ignore next */
@@ -13,8 +14,8 @@ const GLOBAL = globalThis;
13
14
  const THOUSAND = 1e3;
14
15
  const startTimeout = (callback, sec = 0) =>
15
16
  setTimeout(callback, sec * THOUSAND);
16
- const math = Math;
17
17
  const mathFloor = math.floor;
18
+ const mathRandom = math.random;
18
19
  const isNullish = (thing) => thing == null;
19
20
  const isUndefined = (thing) => thing === void 0;
20
21
  const isNull = (thing) => thing === null;
@@ -123,7 +124,7 @@ const encode = (num) => ENCODE[num & MASK6];
123
124
  const getRandomValues = GLOBAL.crypto
124
125
  ? (array) => GLOBAL.crypto.getRandomValues(array)
125
126
  : /* istanbul ignore next */
126
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
127
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
127
128
  const getUniqueId = (length = 16) =>
128
129
  arrayReduce(
129
130
  getRandomValues(new Uint8Array(length)),
@@ -9,6 +9,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
9
9
  str.split(separator, limit);
10
10
 
11
11
  const promise = Promise;
12
+ const math = Math;
12
13
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
13
14
  predicate(value)
14
15
  ? /* istanbul ignore next */
@@ -18,8 +19,8 @@ const GLOBAL = globalThis;
18
19
  const THOUSAND = 1e3;
19
20
  const startTimeout = (callback, sec = 0) =>
20
21
  setTimeout(callback, sec * THOUSAND);
21
- const math = Math;
22
22
  const mathFloor = math.floor;
23
+ const mathRandom = math.random;
23
24
  const isNullish = (thing) => thing == null;
24
25
  const isUndefined = (thing) => thing === void 0;
25
26
  const isNull = (thing) => thing === null;
@@ -163,7 +164,7 @@ const encode = (num) => ENCODE[num & MASK6];
163
164
  const getRandomValues = GLOBAL.crypto
164
165
  ? (array) => GLOBAL.crypto.getRandomValues(array)
165
166
  : /* istanbul ignore next */
166
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
167
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
167
168
  const getUniqueId = (length = 16) =>
168
169
  arrayReduce(
169
170
  getRandomValues(new Uint8Array(length)),
@@ -9,6 +9,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
9
9
  str.split(separator, limit);
10
10
 
11
11
  const promise = Promise;
12
+ const math = Math;
12
13
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
13
14
  predicate(value)
14
15
  ? /* istanbul ignore next */
@@ -18,8 +19,8 @@ const GLOBAL = globalThis;
18
19
  const THOUSAND = 1e3;
19
20
  const startTimeout = (callback, sec = 0) =>
20
21
  setTimeout(callback, sec * THOUSAND);
21
- const math = Math;
22
22
  const mathFloor = math.floor;
23
+ const mathRandom = math.random;
23
24
  const isNullish = (thing) => thing == null;
24
25
  const isUndefined = (thing) => thing === void 0;
25
26
  const isNull = (thing) => thing === null;
@@ -163,7 +164,7 @@ const encode = (num) => ENCODE[num & MASK6];
163
164
  const getRandomValues = GLOBAL.crypto
164
165
  ? (array) => GLOBAL.crypto.getRandomValues(array)
165
166
  : /* istanbul ignore next */
166
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
167
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
167
168
  const getUniqueId = (length = 16) =>
168
169
  arrayReduce(
169
170
  getRandomValues(new Uint8Array(length)),
@@ -9,6 +9,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
9
9
  str.split(separator, limit);
10
10
 
11
11
  const promise = Promise;
12
+ const math = Math;
12
13
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
13
14
  predicate(value)
14
15
  ? /* istanbul ignore next */
@@ -18,8 +19,8 @@ const GLOBAL = globalThis;
18
19
  const THOUSAND = 1e3;
19
20
  const startTimeout = (callback, sec = 0) =>
20
21
  setTimeout(callback, sec * THOUSAND);
21
- const math = Math;
22
22
  const mathFloor = math.floor;
23
+ const mathRandom = math.random;
23
24
  const isNullish = (thing) => thing == null;
24
25
  const isUndefined = (thing) => thing === void 0;
25
26
  const isNull = (thing) => thing === null;
@@ -269,7 +270,7 @@ const encode = (num) => ENCODE[num & MASK6];
269
270
  const getRandomValues = GLOBAL.crypto
270
271
  ? (array) => GLOBAL.crypto.getRandomValues(array)
271
272
  : /* istanbul ignore next */
272
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
273
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
273
274
  const getUniqueId = (length = 16) =>
274
275
  arrayReduce(
275
276
  getRandomValues(new Uint8Array(length)),
@@ -9,6 +9,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
9
9
  str.split(separator, limit);
10
10
 
11
11
  const promise = Promise;
12
+ const math = Math;
12
13
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
13
14
  predicate(value)
14
15
  ? /* istanbul ignore next */
@@ -18,8 +19,8 @@ const GLOBAL = globalThis;
18
19
  const THOUSAND = 1e3;
19
20
  const startTimeout = (callback, sec = 0) =>
20
21
  setTimeout(callback, sec * THOUSAND);
21
- const math = Math;
22
22
  const mathFloor = math.floor;
23
+ const mathRandom = math.random;
23
24
  const isNullish = (thing) => thing == null;
24
25
  const isUndefined = (thing) => thing === void 0;
25
26
  const isNull = (thing) => thing === null;
@@ -269,7 +270,7 @@ const encode = (num) => ENCODE[num & MASK6];
269
270
  const getRandomValues = GLOBAL.crypto
270
271
  ? (array) => GLOBAL.crypto.getRandomValues(array)
271
272
  : /* istanbul ignore next */
272
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
273
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
273
274
  const getUniqueId = (length = 16) =>
274
275
  arrayReduce(
275
276
  getRandomValues(new Uint8Array(length)),
@@ -8,6 +8,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
8
8
  str.split(separator, limit);
9
9
 
10
10
  const promise = Promise;
11
+ const math = Math;
11
12
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
12
13
  predicate(value)
13
14
  ? /* istanbul ignore next */
@@ -17,8 +18,8 @@ const GLOBAL = globalThis;
17
18
  const THOUSAND = 1e3;
18
19
  const startTimeout = (callback, sec = 0) =>
19
20
  setTimeout(callback, sec * THOUSAND);
20
- const math = Math;
21
21
  const mathFloor = math.floor;
22
+ const mathRandom = math.random;
22
23
  const isNullish = (thing) => thing == null;
23
24
  const isUndefined = (thing) => thing === void 0;
24
25
  const isNull = (thing) => thing === null;
@@ -165,7 +166,7 @@ const encode = (num) => ENCODE[num & MASK6];
165
166
  const getRandomValues = GLOBAL.crypto
166
167
  ? (array) => GLOBAL.crypto.getRandomValues(array)
167
168
  : /* istanbul ignore next */
168
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
169
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
169
170
  const getUniqueId = (length = 16) =>
170
171
  arrayReduce(
171
172
  getRandomValues(new Uint8Array(length)),
@@ -8,6 +8,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
8
8
  str.split(separator, limit);
9
9
 
10
10
  const promise = Promise;
11
+ const math = Math;
11
12
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
12
13
  predicate(value)
13
14
  ? /* istanbul ignore next */
@@ -17,8 +18,8 @@ const GLOBAL = globalThis;
17
18
  const THOUSAND = 1e3;
18
19
  const startTimeout = (callback, sec = 0) =>
19
20
  setTimeout(callback, sec * THOUSAND);
20
- const math = Math;
21
21
  const mathFloor = math.floor;
22
+ const mathRandom = math.random;
22
23
  const isNullish = (thing) => thing == null;
23
24
  const isUndefined = (thing) => thing === void 0;
24
25
  const isNull = (thing) => thing === null;
@@ -165,7 +166,7 @@ const encode = (num) => ENCODE[num & MASK6];
165
166
  const getRandomValues = GLOBAL.crypto
166
167
  ? (array) => GLOBAL.crypto.getRandomValues(array)
167
168
  : /* istanbul ignore next */
168
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
169
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
169
170
  const getUniqueId = (length = 16) =>
170
171
  arrayReduce(
171
172
  getRandomValues(new Uint8Array(length)),
@@ -4,6 +4,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
4
4
  str.split(separator, limit);
5
5
 
6
6
  const promise = Promise;
7
+ const math = Math;
7
8
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
8
9
  predicate(value)
9
10
  ? /* istanbul ignore next */
@@ -13,8 +14,8 @@ const GLOBAL = globalThis;
13
14
  const THOUSAND = 1e3;
14
15
  const startTimeout = (callback, sec = 0) =>
15
16
  setTimeout(callback, sec * THOUSAND);
16
- const math = Math;
17
17
  const mathFloor = math.floor;
18
+ const mathRandom = math.random;
18
19
  const isNullish = (thing) => thing == null;
19
20
  const isUndefined = (thing) => thing === void 0;
20
21
  const isNull = (thing) => thing === null;
@@ -121,7 +122,7 @@ const encode = (num) => ENCODE[num & MASK6];
121
122
  const getRandomValues = GLOBAL.crypto
122
123
  ? (array) => GLOBAL.crypto.getRandomValues(array)
123
124
  : /* istanbul ignore next */
124
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
125
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
125
126
  const getUniqueId = (length = 16) =>
126
127
  arrayReduce(
127
128
  getRandomValues(new Uint8Array(length)),
@@ -38,13 +38,16 @@ const EXTRA = 'extra';
38
38
  const strSplit = (str, separator = EMPTY_STRING, limit) =>
39
39
  str.split(separator, limit);
40
40
 
41
+ const math = Math;
41
42
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
42
43
  predicate(value)
43
44
  ? /* istanbul ignore next */
44
45
  otherwise?.()
45
46
  : then(value);
46
47
  const GLOBAL = globalThis;
47
- const math = Math;
48
+ const number = Number;
49
+ const string = String;
50
+ const boolean = Boolean;
48
51
  const mathMin = math.min;
49
52
  const isFiniteNumber = isFinite;
50
53
  const isNullish = (thing) => thing == null;
@@ -705,9 +708,9 @@ const EditableThing = ({
705
708
  } else if (isArray(thing)) {
706
709
  setArrayThing(jsonString(thing));
707
710
  } else {
708
- setStringThing(String(thing));
709
- setNumberThing(Number(thing) || 0);
710
- setBooleanThing(Boolean(thing));
711
+ setStringThing(string(thing));
712
+ setNumberThing(number(thing) || 0);
713
+ setBooleanThing(boolean(thing));
711
714
  }
712
715
  }
713
716
  const handleThingChange = useCallback(
@@ -775,7 +778,7 @@ const EditableThing = ({
775
778
  onChange: useCallback(
776
779
  (event) =>
777
780
  handleThingChange(
778
- String(event[CURRENT_TARGET][_VALUE]),
781
+ string(event[CURRENT_TARGET][_VALUE]),
779
782
  setStringThing,
780
783
  ),
781
784
  [handleThingChange],
@@ -791,7 +794,7 @@ const EditableThing = ({
791
794
  onChange: useCallback(
792
795
  (event) =>
793
796
  handleThingChange(
794
- Number(event[CURRENT_TARGET][_VALUE] || 0),
797
+ number(event[CURRENT_TARGET][_VALUE] || 0),
795
798
  setNumberThing,
796
799
  ),
797
800
  [handleThingChange],
@@ -807,7 +810,7 @@ const EditableThing = ({
807
810
  onChange: useCallback(
808
811
  (event) =>
809
812
  handleThingChange(
810
- Boolean(event[CURRENT_TARGET].checked),
813
+ boolean(event[CURRENT_TARGET].checked),
811
814
  setBooleanThing,
812
815
  ),
813
816
  [handleThingChange],
@@ -38,13 +38,16 @@ const EXTRA = 'extra';
38
38
  const strSplit = (str, separator = EMPTY_STRING, limit) =>
39
39
  str.split(separator, limit);
40
40
 
41
+ const math = Math;
41
42
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
42
43
  predicate(value)
43
44
  ? /* istanbul ignore next */
44
45
  otherwise?.()
45
46
  : then(value);
46
47
  const GLOBAL = globalThis;
47
- const math = Math;
48
+ const number = Number;
49
+ const string = String;
50
+ const boolean = Boolean;
48
51
  const mathMin = math.min;
49
52
  const isFiniteNumber = isFinite;
50
53
  const isNullish = (thing) => thing == null;
@@ -705,9 +708,9 @@ const EditableThing = ({
705
708
  } else if (isArray(thing)) {
706
709
  setArrayThing(jsonString(thing));
707
710
  } else {
708
- setStringThing(String(thing));
709
- setNumberThing(Number(thing) || 0);
710
- setBooleanThing(Boolean(thing));
711
+ setStringThing(string(thing));
712
+ setNumberThing(number(thing) || 0);
713
+ setBooleanThing(boolean(thing));
711
714
  }
712
715
  }
713
716
  const handleThingChange = useCallback(
@@ -775,7 +778,7 @@ const EditableThing = ({
775
778
  onChange: useCallback(
776
779
  (event) =>
777
780
  handleThingChange(
778
- String(event[CURRENT_TARGET][_VALUE]),
781
+ string(event[CURRENT_TARGET][_VALUE]),
779
782
  setStringThing,
780
783
  ),
781
784
  [handleThingChange],
@@ -791,7 +794,7 @@ const EditableThing = ({
791
794
  onChange: useCallback(
792
795
  (event) =>
793
796
  handleThingChange(
794
- Number(event[CURRENT_TARGET][_VALUE] || 0),
797
+ number(event[CURRENT_TARGET][_VALUE] || 0),
795
798
  setNumberThing,
796
799
  ),
797
800
  [handleThingChange],
@@ -807,7 +810,7 @@ const EditableThing = ({
807
810
  onChange: useCallback(
808
811
  (event) =>
809
812
  handleThingChange(
810
- Boolean(event[CURRENT_TARGET].checked),
813
+ boolean(event[CURRENT_TARGET].checked),
811
814
  setBooleanThing,
812
815
  ),
813
816
  [handleThingChange],