ts-data-forge 5.1.0 → 5.1.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 (226) 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/key-is-in.d.mts +2 -2
  82. package/dist/guard/key-is-in.mjs +2 -2
  83. package/dist/json/json.d.mts +21 -21
  84. package/dist/json/json.mjs +21 -21
  85. package/dist/number/branded-types/int.d.mts +19 -19
  86. package/dist/number/branded-types/int.mjs +19 -19
  87. package/dist/number/branded-types/positive-int.d.mts +20 -20
  88. package/dist/number/branded-types/positive-int.mjs +20 -20
  89. package/dist/number/branded-types/positive-safe-int.d.mts +26 -26
  90. package/dist/number/branded-types/positive-safe-int.mjs +26 -26
  91. package/dist/number/branded-types/safe-int.d.mts +27 -27
  92. package/dist/number/branded-types/safe-int.mjs +27 -27
  93. package/dist/number/branded-types/uint.d.mts +19 -19
  94. package/dist/number/branded-types/uint.mjs +19 -19
  95. package/dist/number/num.d.mts +20 -20
  96. package/dist/number/num.mjs +16 -16
  97. package/dist/number/refined-number-utils.d.mts +11 -11
  98. package/dist/number/refined-number-utils.d.mts.map +1 -1
  99. package/dist/number/refined-number-utils.mjs +11 -11
  100. package/dist/object/object.d.mts +3 -3
  101. package/dist/object/object.d.mts.map +1 -1
  102. package/dist/object/object.mjs +3 -3
  103. package/dist/object/object.mjs.map +1 -1
  104. package/dist/others/tuple.d.mts +3 -3
  105. package/dist/others/tuple.mjs +3 -3
  106. package/dist/promise/promise.d.mts +4 -4
  107. package/dist/promise/promise.mjs +4 -4
  108. package/package.json +15 -13
  109. package/src/array/impl/array-utils-creation.test.mts +1 -1
  110. package/src/array/impl/array-utils-element-access.test.mts +16 -16
  111. package/src/array/impl/array-utils-modification.mts +38 -19
  112. package/src/array/impl/array-utils-reducing-value.mts +8 -8
  113. package/src/array/impl/array-utils-reducing-value.test.mts +23 -31
  114. package/src/array/impl/array-utils-search.mts +4 -4
  115. package/src/array/impl/array-utils-search.test.mts +10 -10
  116. package/src/array/impl/array-utils-set-op.mts +7 -7
  117. package/src/array/impl/array-utils-set-op.test.mts +13 -13
  118. package/src/array/impl/array-utils-size.mts +2 -2
  119. package/src/array/impl/array-utils-slicing.mts +2 -2
  120. package/src/array/impl/array-utils-transformation.test.mts +2 -2
  121. package/src/array/impl/array-utils-validation.mts +18 -18
  122. package/src/array/impl/array-utils-validation.test.mts +80 -78
  123. package/src/array/impl/array.test.mts +6 -6
  124. package/src/collections/imap-mapped.test.mts +16 -18
  125. package/src/collections/imap.mts +15 -15
  126. package/src/collections/imap.test.mts +31 -31
  127. package/src/collections/iset-mapped.mts +19 -19
  128. package/src/collections/iset-mapped.test.mts +52 -52
  129. package/src/collections/iset.mts +19 -19
  130. package/src/collections/iset.test.mts +130 -130
  131. package/src/collections/queue.mts +25 -25
  132. package/src/collections/queue.test.mts +33 -35
  133. package/src/collections/stack.mts +25 -25
  134. package/src/collections/stack.test.mts +15 -15
  135. package/src/functional/match.mts +1 -1
  136. package/src/functional/optional/impl/optional-expect-to-be.mts +2 -2
  137. package/src/functional/optional/impl/optional-is-none.mts +1 -1
  138. package/src/functional/optional/impl/optional-is-optional.mts +2 -2
  139. package/src/functional/optional/impl/optional-is-some.mts +1 -1
  140. package/src/functional/optional/impl/optional-none.mts +2 -2
  141. package/src/functional/optional/impl/optional-some.mts +2 -2
  142. package/src/functional/optional/impl/optional-to-nullable.mts +2 -2
  143. package/src/functional/optional/impl/optional-unwrap-or.mts +4 -4
  144. package/src/functional/optional/impl/optional-unwrap-throw.mts +1 -1
  145. package/src/functional/optional/impl/optional-unwrap.mts +2 -2
  146. package/src/functional/optional/impl/optional-zip.mts +1 -1
  147. package/src/functional/optional.test.mts +53 -54
  148. package/src/functional/pipe.mts +2 -2
  149. package/src/functional/pipe.test.mts +4 -4
  150. package/src/functional/result/impl/result-err.mts +1 -1
  151. package/src/functional/result/impl/result-expect-to-be.mts +2 -2
  152. package/src/functional/result/impl/result-from-promise.mts +1 -1
  153. package/src/functional/result/impl/result-from-throwable.mts +1 -1
  154. package/src/functional/result/impl/result-is-err.mts +2 -2
  155. package/src/functional/result/impl/result-is-ok.mts +2 -2
  156. package/src/functional/result/impl/result-is-result.mts +3 -3
  157. package/src/functional/result/impl/result-ok.mts +1 -1
  158. package/src/functional/result/impl/result-unwrap-err-or.mts +4 -4
  159. package/src/functional/result/impl/result-unwrap-err-throw.mts +1 -1
  160. package/src/functional/result/impl/result-unwrap-err.mts +2 -2
  161. package/src/functional/result/impl/result-unwrap-ok-or.mts +4 -4
  162. package/src/functional/result/impl/result-unwrap-ok.mts +2 -2
  163. package/src/functional/result/impl/result-unwrap-throw.mts +1 -1
  164. package/src/functional/result.test.mts +94 -152
  165. package/src/functional/ternary-result/impl/ternary-result-err.mts +1 -1
  166. package/src/functional/ternary-result/impl/ternary-result-from-promise.mts +1 -1
  167. package/src/functional/ternary-result/impl/ternary-result-from-throwable.mts +1 -1
  168. package/src/functional/ternary-result/impl/ternary-result-is-ternary-result.mts +3 -3
  169. package/src/functional/ternary-result.test.mts +8 -8
  170. package/src/globals.d.mts +2 -1
  171. package/src/guard/has-key.mts +8 -5
  172. package/src/guard/has-key.test.mts +0 -5
  173. package/src/guard/is-error.test.mts +143 -0
  174. package/src/guard/is-non-empty-string.test.mts +24 -24
  175. package/src/guard/is-non-null-object.test.mts +26 -26
  176. package/src/guard/is-primitive.test.mts +28 -28
  177. package/src/guard/is-record.test.mts +7 -7
  178. package/src/guard/is-type.test.mts +151 -155
  179. package/src/guard/key-is-in.mts +2 -2
  180. package/src/guard/key-is-in.test.mts +2 -2
  181. package/src/json/json.mts +21 -21
  182. package/src/json/json.test.mts +135 -174
  183. package/src/number/branded-types/finite-number.test.mts +13 -11
  184. package/src/number/branded-types/int.mts +19 -19
  185. package/src/number/branded-types/int.test.mts +14 -14
  186. package/src/number/branded-types/int16.test.mts +16 -16
  187. package/src/number/branded-types/int32.test.mts +16 -16
  188. package/src/number/branded-types/non-negative-finite-number.test.mts +12 -12
  189. package/src/number/branded-types/non-negative-int16.test.mts +16 -16
  190. package/src/number/branded-types/non-negative-int32.test.mts +16 -16
  191. package/src/number/branded-types/non-zero-finite-number.test.mts +14 -14
  192. package/src/number/branded-types/non-zero-int.test.mts +19 -19
  193. package/src/number/branded-types/non-zero-int16.test.mts +16 -16
  194. package/src/number/branded-types/non-zero-int32.test.mts +16 -16
  195. package/src/number/branded-types/non-zero-safe-int.test.mts +23 -23
  196. package/src/number/branded-types/non-zero-uint16.test.mts +16 -16
  197. package/src/number/branded-types/non-zero-uint32.test.mts +16 -16
  198. package/src/number/branded-types/positive-finite-number.test.mts +14 -14
  199. package/src/number/branded-types/positive-int.mts +20 -20
  200. package/src/number/branded-types/positive-int.test.mts +17 -17
  201. package/src/number/branded-types/positive-int16.test.mts +15 -15
  202. package/src/number/branded-types/positive-int32.test.mts +15 -15
  203. package/src/number/branded-types/positive-safe-int.mts +26 -26
  204. package/src/number/branded-types/positive-safe-int.test.mts +19 -19
  205. package/src/number/branded-types/positive-uint16.test.mts +16 -16
  206. package/src/number/branded-types/positive-uint32.test.mts +16 -16
  207. package/src/number/branded-types/safe-int.mts +27 -27
  208. package/src/number/branded-types/safe-int.test.mts +18 -18
  209. package/src/number/branded-types/safe-uint.test.mts +17 -17
  210. package/src/number/branded-types/uint.mts +19 -19
  211. package/src/number/branded-types/uint.test.mts +15 -15
  212. package/src/number/branded-types/uint16.test.mts +15 -15
  213. package/src/number/branded-types/uint32.test.mts +15 -15
  214. package/src/number/enum/int8.test.mts +1 -1
  215. package/src/number/enum/uint8.test.mts +1 -1
  216. package/src/number/num.mts +20 -20
  217. package/src/number/num.test.mts +26 -26
  218. package/src/number/refined-number-utils.mts +13 -13
  219. package/src/object/object.mts +4 -3
  220. package/src/object/object.test.mts +6 -6
  221. package/src/others/cast-mutable.test.mts +1 -1
  222. package/src/others/cast-readonly.test.mts +4 -4
  223. package/src/others/if-then.test.mts +24 -24
  224. package/src/others/tuple.mts +3 -3
  225. package/src/promise/promise.mts +4 -4
  226. package/src/promise/promise.test.mts +7 -13
@@ -44,7 +44,7 @@ type IMapInterface<K extends MapSetKeyType, V> = Readonly<{
44
44
  *
45
45
  * const map = IMap.create(entries);
46
46
  *
47
- * assert(map.size === 2);
47
+ * assert.isTrue(map.size === 2);
48
48
  * ```
49
49
  */
50
50
  size: SizeType.Arr;
@@ -61,9 +61,9 @@ type IMapInterface<K extends MapSetKeyType, V> = Readonly<{
61
61
  * ['enabled', true],
62
62
  * ]);
63
63
  *
64
- * assert.ok(map.has('id'));
64
+ * assert.isTrue(map.has('id'));
65
65
  *
66
- * assert.notOk(map.has('missing'));
66
+ * assert.isFalse(map.has('missing'));
67
67
  * ```
68
68
  *
69
69
  * @param key The key to check.
@@ -107,9 +107,9 @@ type IMapInterface<K extends MapSetKeyType, V> = Readonly<{
107
107
  *
108
108
  * const isNarrowed = map.every((value): value is 2 | 4 => value % 2 === 0);
109
109
  *
110
- * assert.ok(allEven);
110
+ * assert.isTrue(allEven);
111
111
  *
112
- * assert.ok(isNarrowed);
112
+ * assert.isTrue(isNarrowed);
113
113
  * ```
114
114
  *
115
115
  * @param predicate A function to test each key-value pair.
@@ -142,9 +142,9 @@ type IMapInterface<K extends MapSetKeyType, V> = Readonly<{
142
142
  *
143
143
  * const map = IMap.create(entries);
144
144
  *
145
- * assert.ok(map.some((value) => value > 4));
145
+ * assert.isTrue(map.some((value) => value > 4));
146
146
  *
147
- * assert.notOk(map.some((value) => value > 10));
147
+ * assert.isFalse(map.some((value) => value > 10));
148
148
  * ```
149
149
  *
150
150
  * @param predicate A function to test each key-value pair.
@@ -172,9 +172,9 @@ type IMapInterface<K extends MapSetKeyType, V> = Readonly<{
172
172
  *
173
173
  * assert.deepStrictEqual(withoutB.get('b'), Optional.none);
174
174
  *
175
- * assert(original.size === 2);
175
+ * assert.isTrue(original.size === 2);
176
176
  *
177
- * assert(withoutB.size === 1);
177
+ * assert.isTrue(withoutB.size === 1);
178
178
  * ```
179
179
  *
180
180
  * @param key The key to delete.
@@ -233,7 +233,7 @@ type IMapInterface<K extends MapSetKeyType, V> = Readonly<{
233
233
  *
234
234
  * assert.deepStrictEqual(scores.get('alice'), Optional.some(10));
235
235
  *
236
- * assert(unchanged === scores);
236
+ * assert.isTrue(unchanged === scores);
237
237
  * ```
238
238
  *
239
239
  * @param key The key whose value to update.
@@ -575,9 +575,9 @@ type IMapInterface<K extends MapSetKeyType, V> = Readonly<{
575
575
  *
576
576
  * const raw = map.toRawMap();
577
577
  *
578
- * assert.ok(is.map(raw));
578
+ * assert.isTrue(is.map(raw));
579
579
  *
580
- * assert(raw.get('key') === 1);
580
+ * assert.isTrue(raw.get('key') === 1);
581
581
  * ```
582
582
  *
583
583
  * @returns The raw ReadonlyMap instance.
@@ -633,7 +633,7 @@ export namespace IMap {
633
633
  * ['status', 'active'],
634
634
  * ]);
635
635
  *
636
- * assert(map.size === 2);
636
+ * assert.isTrue(map.size === 2);
637
637
  *
638
638
  * assert.deepStrictEqual(map.get('status'), Optional.some('active'));
639
639
  * ```
@@ -676,9 +676,9 @@ export namespace IMap {
676
676
  * ['b', 3],
677
677
  * ]);
678
678
  *
679
- * assert.ok(IMap.equal(first, second));
679
+ * assert.isTrue(IMap.equal(first, second));
680
680
  *
681
- * assert.notOk(IMap.equal(first, third));
681
+ * assert.isFalse(IMap.equal(first, third));
682
682
  * ```
683
683
  *
684
684
  * @template K The type of the keys.
@@ -122,7 +122,7 @@ describe('IMap.equal', () => {
122
122
  ['b', 2],
123
123
  ]);
124
124
 
125
- expect(IMap.equal(map1, map2)).toBe(true);
125
+ assert.isTrue(IMap.equal(map1, map2));
126
126
  });
127
127
 
128
128
  test('should return true for different creation order', () => {
@@ -136,7 +136,7 @@ describe('IMap.equal', () => {
136
136
  ['a', 1],
137
137
  ]);
138
138
 
139
- expect(IMap.equal(map1, map2)).toBe(true);
139
+ assert.isTrue(IMap.equal(map1, map2));
140
140
  });
141
141
 
142
142
  test('should return false for maps with different sizes', () => {
@@ -147,7 +147,7 @@ describe('IMap.equal', () => {
147
147
  ['b', 2],
148
148
  ]);
149
149
 
150
- expect(IMap.equal(map1, map2)).toBe(false);
150
+ assert.isFalse(IMap.equal(map1, map2));
151
151
  });
152
152
 
153
153
  test('should return false for maps with different values', () => {
@@ -161,7 +161,7 @@ describe('IMap.equal', () => {
161
161
  ['b', 3],
162
162
  ]);
163
163
 
164
- expect(IMap.equal(map1, map2)).toBe(false);
164
+ assert.isFalse(IMap.equal(map1, map2));
165
165
  });
166
166
 
167
167
  test('should return false for maps with different keys', () => {
@@ -175,7 +175,7 @@ describe('IMap.equal', () => {
175
175
  ['c', 2],
176
176
  ]);
177
177
 
178
- expect(IMap.equal(map1, map2)).toBe(false);
178
+ assert.isFalse(IMap.equal(map1, map2));
179
179
  });
180
180
 
181
181
  test('should return true for empty maps', () => {
@@ -183,7 +183,7 @@ describe('IMap.equal', () => {
183
183
 
184
184
  const map2 = IMap.create<string, number>([]);
185
185
 
186
- expect(IMap.equal(map1, map2)).toBe(true);
186
+ assert.isTrue(IMap.equal(map1, map2));
187
187
  });
188
188
  });
189
189
 
@@ -209,7 +209,7 @@ describe('IMap.has', () => {
209
209
  [7, 70],
210
210
  ] as const);
211
211
 
212
- expect(m0.has(6)).toBe(true);
212
+ assert.isTrue(m0.has(6));
213
213
  });
214
214
 
215
215
  test('case 2', () => {
@@ -221,13 +221,13 @@ describe('IMap.has', () => {
221
221
  [7, 70],
222
222
  ]);
223
223
 
224
- expect(m0.has(8)).toBe(false);
224
+ assert.isFalse(m0.has(8));
225
225
  });
226
226
 
227
227
  test('case 3', () => {
228
228
  const m0 = IMap.create<number, number>([]);
229
229
 
230
- expect(m0.has(0)).toBe(false);
230
+ assert.isFalse(m0.has(0));
231
231
  });
232
232
 
233
233
  test('case 4', () => {
@@ -240,7 +240,7 @@ describe('IMap.has', () => {
240
240
  [Number.NaN, 0],
241
241
  ] as const);
242
242
 
243
- expect(m0.has(Number.NaN)).toBe(true);
243
+ assert.isTrue(m0.has(Number.NaN));
244
244
  });
245
245
 
246
246
  test('should handle boolean keys', () => {
@@ -249,9 +249,9 @@ describe('IMap.has', () => {
249
249
  [false, 'no'],
250
250
  ]);
251
251
 
252
- expect(map.has(true)).toBe(true);
252
+ assert.isTrue(map.has(true));
253
253
 
254
- expect(map.has(false)).toBe(true);
254
+ assert.isTrue(map.has(false));
255
255
  });
256
256
 
257
257
  test('should handle string number keys', () => {
@@ -260,9 +260,9 @@ describe('IMap.has', () => {
260
260
  ['2', 'two'],
261
261
  ]);
262
262
 
263
- expect(map.has('1')).toBe(true);
263
+ assert.isTrue(map.has('1'));
264
264
 
265
- expect(map.has(String(1))).toBe(true);
265
+ assert.isTrue(map.has(String(1)));
266
266
  });
267
267
  });
268
268
 
@@ -411,7 +411,7 @@ describe('IMap.set', () => {
411
411
 
412
412
  const curr = map.get('a');
413
413
 
414
- assert(Optional.isSome(curr));
414
+ assert.isTrue(Optional.isSome(curr));
415
415
 
416
416
  const updated = map.set('a', curr.value);
417
417
 
@@ -429,9 +429,9 @@ describe('IMap.set', () => {
429
429
 
430
430
  expect(modified.size).toBe(2);
431
431
 
432
- expect(original.has('b')).toBe(false);
432
+ assert.isFalse(original.has('b'));
433
433
 
434
- expect(modified.has('b')).toBe(true);
434
+ assert.isTrue(modified.has('b'));
435
435
  });
436
436
  });
437
437
 
@@ -606,9 +606,9 @@ describe('IMap.delete', () => {
606
606
 
607
607
  expect(modified.size).toBe(1);
608
608
 
609
- expect(original.has('a')).toBe(true);
609
+ assert.isTrue(original.has('a'));
610
610
 
611
- expect(modified.has('a')).toBe(false);
611
+ assert.isFalse(modified.has('a'));
612
612
  });
613
613
  });
614
614
 
@@ -620,7 +620,7 @@ describe('IMap.every', () => {
620
620
  ['c', 6],
621
621
  ]);
622
622
 
623
- expect(map.every((value) => value % 2 === 0)).toBe(true);
623
+ assert.isTrue(map.every((value) => value % 2 === 0));
624
624
  });
625
625
 
626
626
  test('should return false when some elements do not satisfy predicate', () => {
@@ -630,13 +630,13 @@ describe('IMap.every', () => {
630
630
  ['c', 4],
631
631
  ]);
632
632
 
633
- expect(map.every((value) => value % 2 === 0)).toBe(false);
633
+ assert.isFalse(map.every((value) => value % 2 === 0));
634
634
  });
635
635
 
636
636
  test('should return true for empty map', () => {
637
637
  const map = IMap.create<string, number>([]);
638
638
 
639
- expect(map.every((value) => value > 0)).toBe(true);
639
+ assert.isTrue(map.every((value) => value > 0));
640
640
  });
641
641
 
642
642
  test('should work with key parameter', () => {
@@ -646,7 +646,7 @@ describe('IMap.every', () => {
646
646
  ['cc', 3],
647
647
  ]);
648
648
 
649
- expect(map.every((_value, key) => key.length === 2)).toBe(true);
649
+ assert.isTrue(map.every((_value, key) => key.length === 2));
650
650
  });
651
651
 
652
652
  test('should work as type guard', () => {
@@ -659,7 +659,7 @@ describe('IMap.every', () => {
659
659
  // Type should be narrowed to IMap<string, string>
660
660
  const firstValue = Optional.unwrap(map.get('a'));
661
661
 
662
- expect(isString(firstValue)).toBe(true);
662
+ assert.isTrue(isString(firstValue));
663
663
  }
664
664
  });
665
665
  });
@@ -672,7 +672,7 @@ describe('IMap.some', () => {
672
672
  ['c', 3],
673
673
  ]);
674
674
 
675
- expect(map.some((value) => value % 2 === 0)).toBe(true);
675
+ assert.isTrue(map.some((value) => value % 2 === 0));
676
676
  });
677
677
 
678
678
  test('should return false when no elements satisfy predicate', () => {
@@ -682,13 +682,13 @@ describe('IMap.some', () => {
682
682
  ['c', 5],
683
683
  ]);
684
684
 
685
- expect(map.some((value) => value % 2 === 0)).toBe(false);
685
+ assert.isFalse(map.some((value) => value % 2 === 0));
686
686
  });
687
687
 
688
688
  test('should return false for empty map', () => {
689
689
  const map = IMap.create<string, number>([]);
690
690
 
691
- expect(map.some((value) => value > 0)).toBe(false);
691
+ assert.isFalse(map.some((value) => value > 0));
692
692
  });
693
693
 
694
694
  test('should work with key parameter', () => {
@@ -698,7 +698,7 @@ describe('IMap.some', () => {
698
698
  ['c', 3],
699
699
  ]);
700
700
 
701
- expect(map.some((_value, key) => key.length > 1)).toBe(true);
701
+ assert.isTrue(map.some((_value, key) => key.length > 1));
702
702
  });
703
703
  });
704
704
 
@@ -721,7 +721,7 @@ describe('IMap.withMutations', () => {
721
721
 
722
722
  expect(Optional.unwrap(updated.get('c'))).toBe(3);
723
723
 
724
- expect(Optional.isNone(updated.get('b'))).toBe(true);
724
+ assert.isTrue(Optional.isNone(updated.get('b')));
725
725
  });
726
726
 
727
727
  test('should handle empty mutations array', () => {
@@ -748,7 +748,7 @@ describe('IMap.withMutations', () => {
748
748
 
749
749
  expect(updated.size).toBe(map.size);
750
750
 
751
- expect(Optional.isNone(updated.get('nonexistent'))).toBe(true);
751
+ assert.isTrue(Optional.isNone(updated.get('nonexistent')));
752
752
  });
753
753
 
754
754
  test('should handle mixed operations', () => {
@@ -816,7 +816,7 @@ describe('IMap.mapKeys', () => {
816
816
 
817
817
  const mapped = map.mapKeys((key) => key.toUpperCase());
818
818
 
819
- expect(Optional.isNone(mapped.get('a'))).toBe(true);
819
+ assert.isTrue(Optional.isNone(mapped.get('a')));
820
820
 
821
821
  expect(Optional.unwrap(mapped.get('A'))).toBe(1);
822
822
 
@@ -64,7 +64,7 @@ type ISetMappedInterface<K, KM extends MapSetKeyType> = Readonly<{
64
64
  *
65
65
  * const set = ISetMapped.create<Point, string>(points, toKey, fromKey);
66
66
  *
67
- * assert(set.size === 2);
67
+ * assert.isTrue(set.size === 2);
68
68
  * ```
69
69
  */
70
70
  size: SizeType.Arr;
@@ -90,9 +90,9 @@ type ISetMappedInterface<K, KM extends MapSetKeyType> = Readonly<{
90
90
  * fromKey,
91
91
  * );
92
92
  *
93
- * assert.ok(empty.isEmpty);
93
+ * assert.isTrue(empty.isEmpty);
94
94
  *
95
- * assert.notOk(points.isEmpty);
95
+ * assert.isFalse(points.isEmpty);
96
96
  * ```
97
97
  */
98
98
  isEmpty: boolean;
@@ -116,9 +116,9 @@ type ISetMappedInterface<K, KM extends MapSetKeyType> = Readonly<{
116
116
  * fromKey,
117
117
  * );
118
118
  *
119
- * assert.ok(set.has({ x: 1, tag: 'a' }));
119
+ * assert.isTrue(set.has({ x: 1, tag: 'a' }));
120
120
  *
121
- * assert.notOk(set.has({ x: 2, tag: 'b' }));
121
+ * assert.isFalse(set.has({ x: 2, tag: 'b' }));
122
122
  * ```
123
123
  *
124
124
  * @param key The element to check.
@@ -156,9 +156,9 @@ type ISetMappedInterface<K, KM extends MapSetKeyType> = Readonly<{
156
156
  * (point): point is Readonly<{ x: 2 | 4; tag: 'even' }> => point.x % 2 === 0,
157
157
  * );
158
158
  *
159
- * assert.ok(allEven);
159
+ * assert.isTrue(allEven);
160
160
  *
161
- * assert.ok(narrowed);
161
+ * assert.isTrue(narrowed);
162
162
  * ```
163
163
  *
164
164
  * @param predicate A function to test each element.
@@ -200,9 +200,9 @@ type ISetMappedInterface<K, KM extends MapSetKeyType> = Readonly<{
200
200
  * fromKey,
201
201
  * );
202
202
  *
203
- * assert.ok(set.some((point) => point.x > 4));
203
+ * assert.isTrue(set.some((point) => point.x > 4));
204
204
  *
205
- * assert.notOk(set.some((point) => point.x > 10));
205
+ * assert.isFalse(set.some((point) => point.x > 10));
206
206
  * ```
207
207
  *
208
208
  * @param predicate A function to test each element.
@@ -241,7 +241,7 @@ type ISetMappedInterface<K, KM extends MapSetKeyType> = Readonly<{
241
241
  * { x: 2, tag: 'b' },
242
242
  * ]);
243
243
  *
244
- * assert(unchanged === base);
244
+ * assert.isTrue(unchanged === base);
245
245
  * ```
246
246
  *
247
247
  * @param key The element to add.
@@ -277,7 +277,7 @@ type ISetMappedInterface<K, KM extends MapSetKeyType> = Readonly<{
277
277
  *
278
278
  * assert.deepStrictEqual(Array.from(withoutSecond), [{ x: 1, tag: 'a' }]);
279
279
  *
280
- * assert(unchanged === base);
280
+ * assert.isTrue(unchanged === base);
281
281
  * ```
282
282
  *
283
283
  * @param key The element to delete.
@@ -517,9 +517,9 @@ type ISetMappedInterface<K, KM extends MapSetKeyType> = Readonly<{
517
517
  * fromKey,
518
518
  * );
519
519
  *
520
- * assert.ok(subset.isSubsetOf(superset));
520
+ * assert.isTrue(subset.isSubsetOf(superset));
521
521
  *
522
- * assert.notOk(superset.isSubsetOf(subset));
522
+ * assert.isFalse(superset.isSubsetOf(subset));
523
523
  * ```
524
524
  *
525
525
  * @param set The other set.
@@ -556,9 +556,9 @@ type ISetMappedInterface<K, KM extends MapSetKeyType> = Readonly<{
556
556
  * fromKey,
557
557
  * );
558
558
  *
559
- * assert.ok(superset.isSupersetOf(subset));
559
+ * assert.isTrue(superset.isSupersetOf(subset));
560
560
  *
561
- * assert.notOk(subset.isSupersetOf(superset));
561
+ * assert.isFalse(subset.isSupersetOf(superset));
562
562
  * ```
563
563
  *
564
564
  * @param set The other set.
@@ -846,9 +846,9 @@ type ISetMappedInterface<K, KM extends MapSetKeyType> = Readonly<{
846
846
  *
847
847
  * const raw = set.toRawSet();
848
848
  *
849
- * assert.ok(is.set(raw));
849
+ * assert.isTrue(is.set(raw));
850
850
  *
851
- * assert.ok(raw.has(toKey({ x: 1, tag: 'a' })));
851
+ * assert.isTrue(raw.has(toKey({ x: 1, tag: 'a' })));
852
852
  * ```
853
853
  *
854
854
  * @returns The raw ReadonlySet instance.
@@ -991,9 +991,9 @@ export namespace ISetMapped {
991
991
  * fromKey,
992
992
  * );
993
993
  *
994
- * assert.ok(ISetMapped.equal(first, second));
994
+ * assert.isTrue(ISetMapped.equal(first, second));
995
995
  *
996
- * assert.notOk(ISetMapped.equal(first, third));
996
+ * assert.isFalse(ISetMapped.equal(first, third));
997
997
  * ```
998
998
  *
999
999
  * @template K The type of the custom elements.