ts-data-forge 5.1.0 → 6.0.0

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 (230) hide show
  1. package/README.md +46 -44
  2. package/dist/array/impl/array-utils-modification.d.mts.map +1 -1
  3. package/dist/array/impl/array-utils-modification.mjs.map +1 -1
  4. package/dist/array/impl/array-utils-reducing-value.d.mts +8 -8
  5. package/dist/array/impl/array-utils-search.d.mts +4 -4
  6. package/dist/array/impl/array-utils-set-op.d.mts +7 -7
  7. package/dist/array/impl/array-utils-set-op.mjs +7 -7
  8. package/dist/array/impl/array-utils-size.d.mts +2 -2
  9. package/dist/array/impl/array-utils-size.mjs +2 -2
  10. package/dist/array/impl/array-utils-slicing.d.mts +2 -2
  11. package/dist/array/impl/array-utils-slicing.mjs +2 -2
  12. package/dist/array/impl/array-utils-validation.d.mts +18 -18
  13. package/dist/array/impl/array-utils-validation.mjs +14 -14
  14. package/dist/collections/imap.d.mts +15 -15
  15. package/dist/collections/imap.mjs +3 -3
  16. package/dist/collections/iset-mapped.d.mts +19 -19
  17. package/dist/collections/iset-mapped.mjs +2 -2
  18. package/dist/collections/iset.d.mts +19 -19
  19. package/dist/collections/iset.mjs +2 -2
  20. package/dist/collections/queue.d.mts +25 -25
  21. package/dist/collections/queue.mjs +5 -5
  22. package/dist/collections/stack.d.mts +25 -25
  23. package/dist/collections/stack.mjs +5 -5
  24. package/dist/functional/match.d.mts +1 -1
  25. package/dist/functional/optional/impl/optional-expect-to-be.d.mts +2 -2
  26. package/dist/functional/optional/impl/optional-is-none.d.mts +1 -1
  27. package/dist/functional/optional/impl/optional-is-none.mjs +1 -1
  28. package/dist/functional/optional/impl/optional-is-optional.d.mts +2 -2
  29. package/dist/functional/optional/impl/optional-is-optional.mjs +2 -2
  30. package/dist/functional/optional/impl/optional-is-some.d.mts +1 -1
  31. package/dist/functional/optional/impl/optional-is-some.mjs +1 -1
  32. package/dist/functional/optional/impl/optional-none.d.mts +2 -2
  33. package/dist/functional/optional/impl/optional-none.mjs +2 -2
  34. package/dist/functional/optional/impl/optional-some.d.mts +2 -2
  35. package/dist/functional/optional/impl/optional-some.mjs +2 -2
  36. package/dist/functional/optional/impl/optional-to-nullable.d.mts +2 -2
  37. package/dist/functional/optional/impl/optional-to-nullable.mjs +2 -2
  38. package/dist/functional/optional/impl/optional-unwrap-or.d.mts +4 -4
  39. package/dist/functional/optional/impl/optional-unwrap-throw.d.mts +1 -1
  40. package/dist/functional/optional/impl/optional-unwrap-throw.mjs +1 -1
  41. package/dist/functional/optional/impl/optional-unwrap.d.mts +2 -2
  42. package/dist/functional/optional/impl/optional-zip.d.mts +1 -1
  43. package/dist/functional/optional/impl/optional-zip.mjs +1 -1
  44. package/dist/functional/pipe.d.mts +2 -2
  45. package/dist/functional/result/impl/result-err.d.mts +1 -1
  46. package/dist/functional/result/impl/result-err.mjs +1 -1
  47. package/dist/functional/result/impl/result-expect-to-be.d.mts +2 -2
  48. package/dist/functional/result/impl/result-from-promise.d.mts +1 -1
  49. package/dist/functional/result/impl/result-from-promise.mjs +1 -1
  50. package/dist/functional/result/impl/result-from-throwable.d.mts +1 -1
  51. package/dist/functional/result/impl/result-from-throwable.mjs +1 -1
  52. package/dist/functional/result/impl/result-is-err.d.mts +2 -2
  53. package/dist/functional/result/impl/result-is-err.mjs +2 -2
  54. package/dist/functional/result/impl/result-is-ok.d.mts +2 -2
  55. package/dist/functional/result/impl/result-is-ok.mjs +2 -2
  56. package/dist/functional/result/impl/result-is-result.d.mts +3 -3
  57. package/dist/functional/result/impl/result-is-result.mjs +3 -3
  58. package/dist/functional/result/impl/result-ok.d.mts +1 -1
  59. package/dist/functional/result/impl/result-ok.mjs +1 -1
  60. package/dist/functional/result/impl/result-unwrap-err-or.d.mts +4 -4
  61. package/dist/functional/result/impl/result-unwrap-err-throw.d.mts +1 -1
  62. package/dist/functional/result/impl/result-unwrap-err-throw.mjs +1 -1
  63. package/dist/functional/result/impl/result-unwrap-err.d.mts +2 -2
  64. package/dist/functional/result/impl/result-unwrap-err.mjs +2 -2
  65. package/dist/functional/result/impl/result-unwrap-ok-or.d.mts +4 -4
  66. package/dist/functional/result/impl/result-unwrap-ok.d.mts +2 -2
  67. package/dist/functional/result/impl/result-unwrap-throw.d.mts +1 -1
  68. package/dist/functional/result/impl/result-unwrap-throw.mjs +1 -1
  69. package/dist/functional/ternary-result/impl/ternary-result-err.d.mts +1 -1
  70. package/dist/functional/ternary-result/impl/ternary-result-err.mjs +1 -1
  71. package/dist/functional/ternary-result/impl/ternary-result-from-promise.d.mts +1 -1
  72. package/dist/functional/ternary-result/impl/ternary-result-from-promise.mjs +1 -1
  73. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.d.mts +1 -1
  74. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs +1 -1
  75. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.d.mts +3 -3
  76. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.mjs +3 -3
  77. package/dist/globals.d.mts +2 -1
  78. package/dist/guard/has-key.d.mts +6 -3
  79. package/dist/guard/has-key.d.mts.map +1 -1
  80. package/dist/guard/has-key.mjs +2 -2
  81. package/dist/guard/is-record.d.mts.map +1 -1
  82. package/dist/guard/is-record.mjs +1 -1
  83. package/dist/guard/is-record.mjs.map +1 -1
  84. package/dist/guard/key-is-in.d.mts +2 -2
  85. package/dist/guard/key-is-in.mjs +2 -2
  86. package/dist/json/json.d.mts +21 -21
  87. package/dist/json/json.mjs +21 -21
  88. package/dist/number/branded-types/int.d.mts +19 -19
  89. package/dist/number/branded-types/int.mjs +19 -19
  90. package/dist/number/branded-types/positive-int.d.mts +20 -20
  91. package/dist/number/branded-types/positive-int.mjs +20 -20
  92. package/dist/number/branded-types/positive-safe-int.d.mts +26 -26
  93. package/dist/number/branded-types/positive-safe-int.mjs +26 -26
  94. package/dist/number/branded-types/safe-int.d.mts +27 -27
  95. package/dist/number/branded-types/safe-int.mjs +27 -27
  96. package/dist/number/branded-types/uint.d.mts +19 -19
  97. package/dist/number/branded-types/uint.mjs +19 -19
  98. package/dist/number/num.d.mts +20 -20
  99. package/dist/number/num.mjs +16 -16
  100. package/dist/number/refined-number-utils.d.mts +11 -11
  101. package/dist/number/refined-number-utils.d.mts.map +1 -1
  102. package/dist/number/refined-number-utils.mjs +11 -11
  103. package/dist/object/object.d.mts +3 -3
  104. package/dist/object/object.d.mts.map +1 -1
  105. package/dist/object/object.mjs +3 -3
  106. package/dist/object/object.mjs.map +1 -1
  107. package/dist/others/tuple.d.mts +3 -3
  108. package/dist/others/tuple.mjs +3 -3
  109. package/dist/promise/promise.d.mts +4 -4
  110. package/dist/promise/promise.mjs +4 -4
  111. package/package.json +15 -13
  112. package/src/array/impl/array-utils-creation.test.mts +1 -1
  113. package/src/array/impl/array-utils-element-access.test.mts +16 -16
  114. package/src/array/impl/array-utils-modification.mts +38 -19
  115. package/src/array/impl/array-utils-reducing-value.mts +8 -8
  116. package/src/array/impl/array-utils-reducing-value.test.mts +23 -31
  117. package/src/array/impl/array-utils-search.mts +4 -4
  118. package/src/array/impl/array-utils-search.test.mts +10 -10
  119. package/src/array/impl/array-utils-set-op.mts +7 -7
  120. package/src/array/impl/array-utils-set-op.test.mts +13 -13
  121. package/src/array/impl/array-utils-size.mts +2 -2
  122. package/src/array/impl/array-utils-slicing.mts +2 -2
  123. package/src/array/impl/array-utils-transformation.test.mts +2 -2
  124. package/src/array/impl/array-utils-validation.mts +18 -18
  125. package/src/array/impl/array-utils-validation.test.mts +80 -78
  126. package/src/array/impl/array.test.mts +6 -6
  127. package/src/collections/imap-mapped.test.mts +16 -18
  128. package/src/collections/imap.mts +15 -15
  129. package/src/collections/imap.test.mts +31 -31
  130. package/src/collections/iset-mapped.mts +19 -19
  131. package/src/collections/iset-mapped.test.mts +52 -52
  132. package/src/collections/iset.mts +19 -19
  133. package/src/collections/iset.test.mts +130 -130
  134. package/src/collections/queue.mts +25 -25
  135. package/src/collections/queue.test.mts +33 -35
  136. package/src/collections/stack.mts +25 -25
  137. package/src/collections/stack.test.mts +15 -15
  138. package/src/functional/match.mts +1 -1
  139. package/src/functional/optional/impl/optional-expect-to-be.mts +2 -2
  140. package/src/functional/optional/impl/optional-is-none.mts +1 -1
  141. package/src/functional/optional/impl/optional-is-optional.mts +2 -2
  142. package/src/functional/optional/impl/optional-is-some.mts +1 -1
  143. package/src/functional/optional/impl/optional-none.mts +2 -2
  144. package/src/functional/optional/impl/optional-some.mts +2 -2
  145. package/src/functional/optional/impl/optional-to-nullable.mts +2 -2
  146. package/src/functional/optional/impl/optional-unwrap-or.mts +4 -4
  147. package/src/functional/optional/impl/optional-unwrap-throw.mts +1 -1
  148. package/src/functional/optional/impl/optional-unwrap.mts +2 -2
  149. package/src/functional/optional/impl/optional-zip.mts +1 -1
  150. package/src/functional/optional.test.mts +53 -54
  151. package/src/functional/pipe.mts +2 -2
  152. package/src/functional/pipe.test.mts +4 -4
  153. package/src/functional/result/impl/result-err.mts +1 -1
  154. package/src/functional/result/impl/result-expect-to-be.mts +2 -2
  155. package/src/functional/result/impl/result-from-promise.mts +1 -1
  156. package/src/functional/result/impl/result-from-throwable.mts +1 -1
  157. package/src/functional/result/impl/result-is-err.mts +2 -2
  158. package/src/functional/result/impl/result-is-ok.mts +2 -2
  159. package/src/functional/result/impl/result-is-result.mts +3 -3
  160. package/src/functional/result/impl/result-ok.mts +1 -1
  161. package/src/functional/result/impl/result-unwrap-err-or.mts +4 -4
  162. package/src/functional/result/impl/result-unwrap-err-throw.mts +1 -1
  163. package/src/functional/result/impl/result-unwrap-err.mts +2 -2
  164. package/src/functional/result/impl/result-unwrap-ok-or.mts +4 -4
  165. package/src/functional/result/impl/result-unwrap-ok.mts +2 -2
  166. package/src/functional/result/impl/result-unwrap-throw.mts +1 -1
  167. package/src/functional/result.test.mts +94 -152
  168. package/src/functional/ternary-result/impl/ternary-result-err.mts +1 -1
  169. package/src/functional/ternary-result/impl/ternary-result-from-promise.mts +1 -1
  170. package/src/functional/ternary-result/impl/ternary-result-from-throwable.mts +1 -1
  171. package/src/functional/ternary-result/impl/ternary-result-is-ternary-result.mts +3 -3
  172. package/src/functional/ternary-result.test.mts +8 -8
  173. package/src/globals.d.mts +2 -1
  174. package/src/guard/has-key.mts +8 -5
  175. package/src/guard/has-key.test.mts +0 -5
  176. package/src/guard/is-error.test.mts +143 -0
  177. package/src/guard/is-non-empty-string.test.mts +24 -24
  178. package/src/guard/is-non-null-object.test.mts +26 -26
  179. package/src/guard/is-primitive.test.mts +28 -28
  180. package/src/guard/is-record.mts +1 -2
  181. package/src/guard/is-record.test.mts +57 -67
  182. package/src/guard/is-type.test.mts +151 -155
  183. package/src/guard/key-is-in.mts +2 -2
  184. package/src/guard/key-is-in.test.mts +2 -2
  185. package/src/json/json.mts +21 -21
  186. package/src/json/json.test.mts +135 -174
  187. package/src/number/branded-types/finite-number.test.mts +13 -11
  188. package/src/number/branded-types/int.mts +19 -19
  189. package/src/number/branded-types/int.test.mts +14 -14
  190. package/src/number/branded-types/int16.test.mts +16 -16
  191. package/src/number/branded-types/int32.test.mts +16 -16
  192. package/src/number/branded-types/non-negative-finite-number.test.mts +12 -12
  193. package/src/number/branded-types/non-negative-int16.test.mts +16 -16
  194. package/src/number/branded-types/non-negative-int32.test.mts +16 -16
  195. package/src/number/branded-types/non-zero-finite-number.test.mts +14 -14
  196. package/src/number/branded-types/non-zero-int.test.mts +19 -19
  197. package/src/number/branded-types/non-zero-int16.test.mts +16 -16
  198. package/src/number/branded-types/non-zero-int32.test.mts +16 -16
  199. package/src/number/branded-types/non-zero-safe-int.test.mts +23 -23
  200. package/src/number/branded-types/non-zero-uint16.test.mts +16 -16
  201. package/src/number/branded-types/non-zero-uint32.test.mts +16 -16
  202. package/src/number/branded-types/positive-finite-number.test.mts +14 -14
  203. package/src/number/branded-types/positive-int.mts +20 -20
  204. package/src/number/branded-types/positive-int.test.mts +17 -17
  205. package/src/number/branded-types/positive-int16.test.mts +15 -15
  206. package/src/number/branded-types/positive-int32.test.mts +15 -15
  207. package/src/number/branded-types/positive-safe-int.mts +26 -26
  208. package/src/number/branded-types/positive-safe-int.test.mts +19 -19
  209. package/src/number/branded-types/positive-uint16.test.mts +16 -16
  210. package/src/number/branded-types/positive-uint32.test.mts +16 -16
  211. package/src/number/branded-types/safe-int.mts +27 -27
  212. package/src/number/branded-types/safe-int.test.mts +18 -18
  213. package/src/number/branded-types/safe-uint.test.mts +17 -17
  214. package/src/number/branded-types/uint.mts +19 -19
  215. package/src/number/branded-types/uint.test.mts +15 -15
  216. package/src/number/branded-types/uint16.test.mts +15 -15
  217. package/src/number/branded-types/uint32.test.mts +15 -15
  218. package/src/number/enum/int8.test.mts +1 -1
  219. package/src/number/enum/uint8.test.mts +1 -1
  220. package/src/number/num.mts +20 -20
  221. package/src/number/num.test.mts +26 -26
  222. package/src/number/refined-number-utils.mts +13 -13
  223. package/src/object/object.mts +4 -3
  224. package/src/object/object.test.mts +6 -6
  225. package/src/others/cast-mutable.test.mts +1 -1
  226. package/src/others/cast-readonly.test.mts +4 -4
  227. package/src/others/if-then.test.mts +24 -24
  228. package/src/others/tuple.mts +3 -3
  229. package/src/promise/promise.mts +4 -4
  230. package/src/promise/promise.test.mts +7 -13
@@ -9,11 +9,11 @@ import { TsDataForgeInternals } from '../refined-number-utils.mjs';
9
9
  * @example
10
10
  *
11
11
  * ```ts
12
- * assert.ok(isInt(5));
12
+ * assert.isTrue(isInt(5));
13
13
  *
14
- * assert.notOk(isInt(5.25));
14
+ * assert.isFalse(isInt(5.25));
15
15
  *
16
- * assert.ok(Int.is(-10));
16
+ * assert.isTrue(Int.is(-10));
17
17
  * ```
18
18
  *
19
19
  * @param value - The value to check
@@ -32,9 +32,9 @@ export declare const isInt: (a: number) => a is Int;
32
32
  * ```ts
33
33
  * const branded = asInt(42);
34
34
  *
35
- * assert(branded === 42);
35
+ * assert.isTrue(branded === 42);
36
36
  *
37
- * assert.ok(Int.is(branded));
37
+ * assert.isTrue(Int.is(branded));
38
38
  * ```
39
39
  *
40
40
  * @param value - The value to cast
@@ -66,11 +66,11 @@ export declare const Int: {
66
66
  * @example
67
67
  *
68
68
  * ```ts
69
- * assert.ok(isInt(5));
69
+ * assert.isTrue(isInt(5));
70
70
  *
71
- * assert.notOk(isInt(5.25));
71
+ * assert.isFalse(isInt(5.25));
72
72
  *
73
- * assert.ok(Int.is(-10));
73
+ * assert.isTrue(Int.is(-10));
74
74
  * ```
75
75
  *
76
76
  * @param value - The value to check
@@ -92,9 +92,9 @@ export declare const Int: {
92
92
  *
93
93
  * const absolute = Int.abs(negative);
94
94
  *
95
- * assert(absolute === 12);
95
+ * assert.isTrue(absolute === 12);
96
96
  *
97
- * assert.ok(Int.is(absolute));
97
+ * assert.isTrue(Int.is(absolute));
98
98
  * ```
99
99
  *
100
100
  * @param a - The integer value
@@ -109,7 +109,7 @@ export declare const Int: {
109
109
  * ```ts
110
110
  * const smallest = Int.min(asInt(7), asInt(-3), asInt(2));
111
111
  *
112
- * assert(smallest === -3);
112
+ * assert.isTrue(smallest === -3);
113
113
  * ```
114
114
  *
115
115
  * @param values - The integers to compare (at least one required)
@@ -124,7 +124,7 @@ export declare const Int: {
124
124
  * ```ts
125
125
  * const largest = Int.max(asInt(7), asInt(-3), asInt(2));
126
126
  *
127
- * assert(largest === 7);
127
+ * assert.isTrue(largest === 7);
128
128
  * ```
129
129
  *
130
130
  * @param values - The integers to compare (at least one required)
@@ -146,9 +146,9 @@ export declare const Int: {
146
146
  *
147
147
  * const randomValue = Int.random(min, max);
148
148
  *
149
- * assert.ok(Int.is(randomValue));
149
+ * assert.isTrue(Int.is(randomValue));
150
150
  *
151
- * assert.ok(randomValue >= 1 && randomValue <= 6);
151
+ * assert.isTrue(randomValue >= 1 && randomValue <= 6);
152
152
  * ```
153
153
  *
154
154
  * @param min - The minimum value (inclusive)
@@ -168,7 +168,7 @@ export declare const Int: {
168
168
  *
169
169
  * const power = Int.pow(base, exponent);
170
170
  *
171
- * assert(power === 32);
171
+ * assert.isTrue(power === 32);
172
172
  * ```
173
173
  *
174
174
  * @param a - The base integer
@@ -184,7 +184,7 @@ export declare const Int: {
184
184
  * ```ts
185
185
  * const sum = Int.add(asInt(12), asInt(8));
186
186
  *
187
- * assert(sum === 20);
187
+ * assert.isTrue(sum === 20);
188
188
  * ```
189
189
  *
190
190
  * @param a - First integer
@@ -200,7 +200,7 @@ export declare const Int: {
200
200
  * ```ts
201
201
  * const difference = Int.sub(asInt(12), asInt(8));
202
202
  *
203
- * assert(difference === 4);
203
+ * assert.isTrue(difference === 4);
204
204
  * ```
205
205
  *
206
206
  * @param a - First integer
@@ -216,7 +216,7 @@ export declare const Int: {
216
216
  * ```ts
217
217
  * const product = Int.mul(asInt(-4), asInt(6));
218
218
  *
219
- * assert(product === -24);
219
+ * assert.isTrue(product === -24);
220
220
  * ```
221
221
  *
222
222
  * @param a - First integer
@@ -239,7 +239,7 @@ export declare const Int: {
239
239
  *
240
240
  * const quotient = Int.div(dividend, divisor);
241
241
  *
242
- * assert(quotient === 3);
242
+ * assert.isTrue(quotient === 3);
243
243
  * ```
244
244
  *
245
245
  * @param a - The dividend
@@ -17,11 +17,11 @@ const { abs, add, castType, div, is, max: max_, min: min_, mul, pow, random, sub
17
17
  * @example
18
18
  *
19
19
  * ```ts
20
- * assert.ok(isInt(5));
20
+ * assert.isTrue(isInt(5));
21
21
  *
22
- * assert.notOk(isInt(5.25));
22
+ * assert.isFalse(isInt(5.25));
23
23
  *
24
- * assert.ok(Int.is(-10));
24
+ * assert.isTrue(Int.is(-10));
25
25
  * ```
26
26
  *
27
27
  * @param value - The value to check
@@ -40,9 +40,9 @@ const isInt = is;
40
40
  * ```ts
41
41
  * const branded = asInt(42);
42
42
  *
43
- * assert(branded === 42);
43
+ * assert.isTrue(branded === 42);
44
44
  *
45
- * assert.ok(Int.is(branded));
45
+ * assert.isTrue(Int.is(branded));
46
46
  * ```
47
47
  *
48
48
  * @param value - The value to cast
@@ -68,11 +68,11 @@ const Int = {
68
68
  * @example
69
69
  *
70
70
  * ```ts
71
- * assert.ok(isInt(5));
71
+ * assert.isTrue(isInt(5));
72
72
  *
73
- * assert.notOk(isInt(5.25));
73
+ * assert.isFalse(isInt(5.25));
74
74
  *
75
- * assert.ok(Int.is(-10));
75
+ * assert.isTrue(Int.is(-10));
76
76
  * ```
77
77
  *
78
78
  * @param value - The value to check
@@ -94,9 +94,9 @@ const Int = {
94
94
  *
95
95
  * const absolute = Int.abs(negative);
96
96
  *
97
- * assert(absolute === 12);
97
+ * assert.isTrue(absolute === 12);
98
98
  *
99
- * assert.ok(Int.is(absolute));
99
+ * assert.isTrue(Int.is(absolute));
100
100
  * ```
101
101
  *
102
102
  * @param a - The integer value
@@ -111,7 +111,7 @@ const Int = {
111
111
  * ```ts
112
112
  * const smallest = Int.min(asInt(7), asInt(-3), asInt(2));
113
113
  *
114
- * assert(smallest === -3);
114
+ * assert.isTrue(smallest === -3);
115
115
  * ```
116
116
  *
117
117
  * @param values - The integers to compare (at least one required)
@@ -126,7 +126,7 @@ const Int = {
126
126
  * ```ts
127
127
  * const largest = Int.max(asInt(7), asInt(-3), asInt(2));
128
128
  *
129
- * assert(largest === 7);
129
+ * assert.isTrue(largest === 7);
130
130
  * ```
131
131
  *
132
132
  * @param values - The integers to compare (at least one required)
@@ -148,9 +148,9 @@ const Int = {
148
148
  *
149
149
  * const randomValue = Int.random(min, max);
150
150
  *
151
- * assert.ok(Int.is(randomValue));
151
+ * assert.isTrue(Int.is(randomValue));
152
152
  *
153
- * assert.ok(randomValue >= 1 && randomValue <= 6);
153
+ * assert.isTrue(randomValue >= 1 && randomValue <= 6);
154
154
  * ```
155
155
  *
156
156
  * @param min - The minimum value (inclusive)
@@ -170,7 +170,7 @@ const Int = {
170
170
  *
171
171
  * const power = Int.pow(base, exponent);
172
172
  *
173
- * assert(power === 32);
173
+ * assert.isTrue(power === 32);
174
174
  * ```
175
175
  *
176
176
  * @param a - The base integer
@@ -186,7 +186,7 @@ const Int = {
186
186
  * ```ts
187
187
  * const sum = Int.add(asInt(12), asInt(8));
188
188
  *
189
- * assert(sum === 20);
189
+ * assert.isTrue(sum === 20);
190
190
  * ```
191
191
  *
192
192
  * @param a - First integer
@@ -202,7 +202,7 @@ const Int = {
202
202
  * ```ts
203
203
  * const difference = Int.sub(asInt(12), asInt(8));
204
204
  *
205
- * assert(difference === 4);
205
+ * assert.isTrue(difference === 4);
206
206
  * ```
207
207
  *
208
208
  * @param a - First integer
@@ -218,7 +218,7 @@ const Int = {
218
218
  * ```ts
219
219
  * const product = Int.mul(asInt(-4), asInt(6));
220
220
  *
221
- * assert(product === -24);
221
+ * assert.isTrue(product === -24);
222
222
  * ```
223
223
  *
224
224
  * @param a - First integer
@@ -241,7 +241,7 @@ const Int = {
241
241
  *
242
242
  * const quotient = Int.div(dividend, divisor);
243
243
  *
244
- * assert(quotient === 3);
244
+ * assert.isTrue(quotient === 3);
245
245
  * ```
246
246
  *
247
247
  * @param a - The dividend
@@ -7,11 +7,11 @@
7
7
  * @example
8
8
  *
9
9
  * ```ts
10
- * assert.ok(isPositiveInt(5));
10
+ * assert.isTrue(isPositiveInt(5));
11
11
  *
12
- * assert.notOk(isPositiveInt(0));
12
+ * assert.isFalse(isPositiveInt(0));
13
13
  *
14
- * assert.ok(PositiveInt.is(10));
14
+ * assert.isTrue(PositiveInt.is(10));
15
15
  * ```
16
16
  *
17
17
  * @param value - The value to check
@@ -30,9 +30,9 @@ export declare const isPositiveInt: (a: number) => a is PositiveInt;
30
30
  * ```ts
31
31
  * const branded = asPositiveInt(7);
32
32
  *
33
- * assert(branded === 7);
33
+ * assert.isTrue(branded === 7);
34
34
  *
35
- * assert.ok(PositiveInt.is(branded));
35
+ * assert.isTrue(PositiveInt.is(branded));
36
36
  * ```
37
37
  *
38
38
  * @param value - The value to cast
@@ -75,11 +75,11 @@ export declare const PositiveInt: {
75
75
  * @example
76
76
  *
77
77
  * ```ts
78
- * assert.ok(isPositiveInt(5));
78
+ * assert.isTrue(isPositiveInt(5));
79
79
  *
80
- * assert.notOk(isPositiveInt(0));
80
+ * assert.isFalse(isPositiveInt(0));
81
81
  *
82
- * assert.ok(PositiveInt.is(10));
82
+ * assert.isTrue(PositiveInt.is(10));
83
83
  * ```
84
84
  *
85
85
  * @param value - The value to check
@@ -108,7 +108,7 @@ export declare const PositiveInt: {
108
108
  * asPositiveInt(12),
109
109
  * );
110
110
  *
111
- * assert(smallest === 3);
111
+ * assert.isTrue(smallest === 3);
112
112
  * ```
113
113
  *
114
114
  * @param values - The positive integers to compare (at least one required)
@@ -127,7 +127,7 @@ export declare const PositiveInt: {
127
127
  * asPositiveInt(12),
128
128
  * );
129
129
  *
130
- * assert(largest === 12);
130
+ * assert.isTrue(largest === 12);
131
131
  * ```
132
132
  *
133
133
  * @param values - The positive integers to compare (at least one required)
@@ -147,9 +147,9 @@ export declare const PositiveInt: {
147
147
  *
148
148
  * const withinRange = PositiveInt.clamp(10);
149
149
  *
150
- * assert(belowRange === 1);
150
+ * assert.isTrue(belowRange === 1);
151
151
  *
152
- * assert(withinRange === 10);
152
+ * assert.isTrue(withinRange === 10);
153
153
  * ```
154
154
  *
155
155
  * @param value - The number to clamp
@@ -171,9 +171,9 @@ export declare const PositiveInt: {
171
171
  *
172
172
  * const randomValue = PositiveInt.random(min, max);
173
173
  *
174
- * assert.ok(PositiveInt.is(randomValue));
174
+ * assert.isTrue(PositiveInt.is(randomValue));
175
175
  *
176
- * assert.ok(randomValue >= 3 && randomValue <= 6);
176
+ * assert.isTrue(randomValue >= 3 && randomValue <= 6);
177
177
  * ```
178
178
  *
179
179
  * @param min - The minimum value (inclusive, must be >= 1)
@@ -194,7 +194,7 @@ export declare const PositiveInt: {
194
194
  *
195
195
  * const power = PositiveInt.pow(base, exponent);
196
196
  *
197
- * assert(power === 16);
197
+ * assert.isTrue(power === 16);
198
198
  * ```
199
199
  *
200
200
  * @param a - The base positive integer
@@ -210,7 +210,7 @@ export declare const PositiveInt: {
210
210
  * ```ts
211
211
  * const sum = PositiveInt.add(asPositiveInt(4), asPositiveInt(5));
212
212
  *
213
- * assert(sum === 9);
213
+ * assert.isTrue(sum === 9);
214
214
  * ```
215
215
  *
216
216
  * @param a - First positive integer
@@ -229,7 +229,7 @@ export declare const PositiveInt: {
229
229
  * ```ts
230
230
  * const difference = PositiveInt.sub(asPositiveInt(5), asPositiveInt(7));
231
231
  *
232
- * assert(difference === 1);
232
+ * assert.isTrue(difference === 1);
233
233
  * ```
234
234
  *
235
235
  * @param a - The minuend (positive integer)
@@ -245,7 +245,7 @@ export declare const PositiveInt: {
245
245
  * ```ts
246
246
  * const product = PositiveInt.mul(asPositiveInt(3), asPositiveInt(7));
247
247
  *
248
- * assert(product === 21);
248
+ * assert.isTrue(product === 21);
249
249
  * ```
250
250
  *
251
251
  * @param a - First positive integer
@@ -268,9 +268,9 @@ export declare const PositiveInt: {
268
268
  *
269
269
  * const clamped = PositiveInt.div(asPositiveInt(3), asPositiveInt(10));
270
270
  *
271
- * assert(quotient === 4);
271
+ * assert.isTrue(quotient === 4);
272
272
  *
273
- * assert(clamped === 1);
273
+ * assert.isTrue(clamped === 1);
274
274
  * ```
275
275
  *
276
276
  * @param a - The dividend (positive integer)
@@ -16,11 +16,11 @@ const { MIN_VALUE, add, castType, clamp, div, is, max: max_, min: min_, mul, pow
16
16
  * @example
17
17
  *
18
18
  * ```ts
19
- * assert.ok(isPositiveInt(5));
19
+ * assert.isTrue(isPositiveInt(5));
20
20
  *
21
- * assert.notOk(isPositiveInt(0));
21
+ * assert.isFalse(isPositiveInt(0));
22
22
  *
23
- * assert.ok(PositiveInt.is(10));
23
+ * assert.isTrue(PositiveInt.is(10));
24
24
  * ```
25
25
  *
26
26
  * @param value - The value to check
@@ -39,9 +39,9 @@ const isPositiveInt = is;
39
39
  * ```ts
40
40
  * const branded = asPositiveInt(7);
41
41
  *
42
- * assert(branded === 7);
42
+ * assert.isTrue(branded === 7);
43
43
  *
44
- * assert.ok(PositiveInt.is(branded));
44
+ * assert.isTrue(PositiveInt.is(branded));
45
45
  * ```
46
46
  *
47
47
  * @param value - The value to cast
@@ -72,11 +72,11 @@ const PositiveInt = {
72
72
  * @example
73
73
  *
74
74
  * ```ts
75
- * assert.ok(isPositiveInt(5));
75
+ * assert.isTrue(isPositiveInt(5));
76
76
  *
77
- * assert.notOk(isPositiveInt(0));
77
+ * assert.isFalse(isPositiveInt(0));
78
78
  *
79
- * assert.ok(PositiveInt.is(10));
79
+ * assert.isTrue(PositiveInt.is(10));
80
80
  * ```
81
81
  *
82
82
  * @param value - The value to check
@@ -105,7 +105,7 @@ const PositiveInt = {
105
105
  * asPositiveInt(12),
106
106
  * );
107
107
  *
108
- * assert(smallest === 3);
108
+ * assert.isTrue(smallest === 3);
109
109
  * ```
110
110
  *
111
111
  * @param values - The positive integers to compare (at least one required)
@@ -124,7 +124,7 @@ const PositiveInt = {
124
124
  * asPositiveInt(12),
125
125
  * );
126
126
  *
127
- * assert(largest === 12);
127
+ * assert.isTrue(largest === 12);
128
128
  * ```
129
129
  *
130
130
  * @param values - The positive integers to compare (at least one required)
@@ -144,9 +144,9 @@ const PositiveInt = {
144
144
  *
145
145
  * const withinRange = PositiveInt.clamp(10);
146
146
  *
147
- * assert(belowRange === 1);
147
+ * assert.isTrue(belowRange === 1);
148
148
  *
149
- * assert(withinRange === 10);
149
+ * assert.isTrue(withinRange === 10);
150
150
  * ```
151
151
  *
152
152
  * @param value - The number to clamp
@@ -168,9 +168,9 @@ const PositiveInt = {
168
168
  *
169
169
  * const randomValue = PositiveInt.random(min, max);
170
170
  *
171
- * assert.ok(PositiveInt.is(randomValue));
171
+ * assert.isTrue(PositiveInt.is(randomValue));
172
172
  *
173
- * assert.ok(randomValue >= 3 && randomValue <= 6);
173
+ * assert.isTrue(randomValue >= 3 && randomValue <= 6);
174
174
  * ```
175
175
  *
176
176
  * @param min - The minimum value (inclusive, must be >= 1)
@@ -191,7 +191,7 @@ const PositiveInt = {
191
191
  *
192
192
  * const power = PositiveInt.pow(base, exponent);
193
193
  *
194
- * assert(power === 16);
194
+ * assert.isTrue(power === 16);
195
195
  * ```
196
196
  *
197
197
  * @param a - The base positive integer
@@ -207,7 +207,7 @@ const PositiveInt = {
207
207
  * ```ts
208
208
  * const sum = PositiveInt.add(asPositiveInt(4), asPositiveInt(5));
209
209
  *
210
- * assert(sum === 9);
210
+ * assert.isTrue(sum === 9);
211
211
  * ```
212
212
  *
213
213
  * @param a - First positive integer
@@ -226,7 +226,7 @@ const PositiveInt = {
226
226
  * ```ts
227
227
  * const difference = PositiveInt.sub(asPositiveInt(5), asPositiveInt(7));
228
228
  *
229
- * assert(difference === 1);
229
+ * assert.isTrue(difference === 1);
230
230
  * ```
231
231
  *
232
232
  * @param a - The minuend (positive integer)
@@ -242,7 +242,7 @@ const PositiveInt = {
242
242
  * ```ts
243
243
  * const product = PositiveInt.mul(asPositiveInt(3), asPositiveInt(7));
244
244
  *
245
- * assert(product === 21);
245
+ * assert.isTrue(product === 21);
246
246
  * ```
247
247
  *
248
248
  * @param a - First positive integer
@@ -265,9 +265,9 @@ const PositiveInt = {
265
265
  *
266
266
  * const clamped = PositiveInt.div(asPositiveInt(3), asPositiveInt(10));
267
267
  *
268
- * assert(quotient === 4);
268
+ * assert.isTrue(quotient === 4);
269
269
  *
270
- * assert(clamped === 1);
270
+ * assert.isTrue(clamped === 1);
271
271
  * ```
272
272
  *
273
273
  * @param a - The dividend (positive integer)
@@ -5,13 +5,13 @@
5
5
  * @example
6
6
  *
7
7
  * ```ts
8
- * assert.ok(isPositiveSafeInt(1));
8
+ * assert.isTrue(isPositiveSafeInt(1));
9
9
  *
10
- * assert.ok(isPositiveSafeInt(Number.MAX_SAFE_INTEGER));
10
+ * assert.isTrue(isPositiveSafeInt(Number.MAX_SAFE_INTEGER));
11
11
  *
12
- * assert.notOk(isPositiveSafeInt(0));
12
+ * assert.isFalse(isPositiveSafeInt(0));
13
13
  *
14
- * assert.ok(PositiveSafeInt.is(42));
14
+ * assert.isTrue(PositiveSafeInt.is(42));
15
15
  * ```
16
16
  *
17
17
  * @param value The value to check.
@@ -26,9 +26,9 @@ export declare const isPositiveSafeInt: (a: number) => a is PositiveSafeInt;
26
26
  * ```ts
27
27
  * const branded = asPositiveSafeInt(128);
28
28
  *
29
- * assert(branded === 128);
29
+ * assert.isTrue(branded === 128);
30
30
  *
31
- * assert.ok(PositiveSafeInt.is(branded));
31
+ * assert.isTrue(PositiveSafeInt.is(branded));
32
32
  * ```
33
33
  *
34
34
  * @param value The value to cast.
@@ -65,13 +65,13 @@ export declare const PositiveSafeInt: {
65
65
  * @example
66
66
  *
67
67
  * ```ts
68
- * assert.ok(isPositiveSafeInt(1));
68
+ * assert.isTrue(isPositiveSafeInt(1));
69
69
  *
70
- * assert.ok(isPositiveSafeInt(Number.MAX_SAFE_INTEGER));
70
+ * assert.isTrue(isPositiveSafeInt(Number.MAX_SAFE_INTEGER));
71
71
  *
72
- * assert.notOk(isPositiveSafeInt(0));
72
+ * assert.isFalse(isPositiveSafeInt(0));
73
73
  *
74
- * assert.ok(PositiveSafeInt.is(42));
74
+ * assert.isTrue(PositiveSafeInt.is(42));
75
75
  * ```
76
76
  *
77
77
  * @param value The value to check.
@@ -102,7 +102,7 @@ export declare const PositiveSafeInt: {
102
102
  * asPositiveSafeInt(5),
103
103
  * );
104
104
  *
105
- * assert(smallest === 5);
105
+ * assert.isTrue(smallest === 5);
106
106
  * ```
107
107
  *
108
108
  * @param a The first PositiveSafeInt.
@@ -121,7 +121,7 @@ export declare const PositiveSafeInt: {
121
121
  * asPositiveSafeInt(5),
122
122
  * );
123
123
  *
124
- * assert(largest === 10);
124
+ * assert.isTrue(largest === 10);
125
125
  * ```
126
126
  *
127
127
  * @param a The first PositiveSafeInt.
@@ -141,11 +141,11 @@ export declare const PositiveSafeInt: {
141
141
  *
142
142
  * const aboveRange = PositiveSafeInt.clamp(Number.MAX_SAFE_INTEGER + 10);
143
143
  *
144
- * assert(belowRange === 1);
144
+ * assert.isTrue(belowRange === 1);
145
145
  *
146
- * assert(withinRange === 123);
146
+ * assert.isTrue(withinRange === 123);
147
147
  *
148
- * assert(aboveRange === Number.MAX_SAFE_INTEGER);
148
+ * assert.isTrue(aboveRange === Number.MAX_SAFE_INTEGER);
149
149
  * ```
150
150
  *
151
151
  * @param value The number to clamp.
@@ -164,9 +164,9 @@ export declare const PositiveSafeInt: {
164
164
  *
165
165
  * const randomValue = PositiveSafeInt.random(min, max);
166
166
  *
167
- * assert.ok(PositiveSafeInt.is(randomValue));
167
+ * assert.isTrue(PositiveSafeInt.is(randomValue));
168
168
  *
169
- * assert.ok(randomValue >= 1 && randomValue <= 6);
169
+ * assert.isTrue(randomValue >= 1 && randomValue <= 6);
170
170
  * ```
171
171
  *
172
172
  * @returns A random PositiveSafeInt between 1 and MAX_SAFE_INTEGER.
@@ -184,7 +184,7 @@ export declare const PositiveSafeInt: {
184
184
  *
185
185
  * const power = PositiveSafeInt.pow(base, exponent);
186
186
  *
187
- * assert(power === 27);
187
+ * assert.isTrue(power === 27);
188
188
  * ```
189
189
  *
190
190
  * @param a The base PositiveSafeInt.
@@ -203,9 +203,9 @@ export declare const PositiveSafeInt: {
203
203
  * asPositiveSafeInt(2048),
204
204
  * );
205
205
  *
206
- * assert(sum === 3048);
206
+ * assert.isTrue(sum === 3048);
207
207
  *
208
- * assert.ok(PositiveSafeInt.is(sum));
208
+ * assert.isTrue(PositiveSafeInt.is(sum));
209
209
  * ```
210
210
  *
211
211
  * @param a The first PositiveSafeInt.
@@ -224,9 +224,9 @@ export declare const PositiveSafeInt: {
224
224
  * asPositiveSafeInt(20),
225
225
  * );
226
226
  *
227
- * assert(difference === 1);
227
+ * assert.isTrue(difference === 1);
228
228
  *
229
- * assert.ok(PositiveSafeInt.is(difference));
229
+ * assert.isTrue(PositiveSafeInt.is(difference));
230
230
  * ```
231
231
  *
232
232
  * @param a The minuend PositiveSafeInt.
@@ -246,9 +246,9 @@ export declare const PositiveSafeInt: {
246
246
  * asPositiveSafeInt(20),
247
247
  * );
248
248
  *
249
- * assert(product === 1000);
249
+ * assert.isTrue(product === 1000);
250
250
  *
251
- * assert.ok(PositiveSafeInt.is(product));
251
+ * assert.isTrue(PositiveSafeInt.is(product));
252
252
  * ```
253
253
  *
254
254
  * @param a The first PositiveSafeInt.
@@ -272,9 +272,9 @@ export declare const PositiveSafeInt: {
272
272
  * asPositiveSafeInt(50),
273
273
  * );
274
274
  *
275
- * assert(quotient === 6);
275
+ * assert.isTrue(quotient === 6);
276
276
  *
277
- * assert(clamped === 1);
277
+ * assert.isTrue(clamped === 1);
278
278
  * ```
279
279
  *
280
280
  * @param a The dividend PositiveSafeInt.