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
@@ -51,7 +51,7 @@ describe('ISetMapped.has', () => {
51
51
  fromKey,
52
52
  );
53
53
 
54
- expect(s0.has({ v: 3 })).toBe(true);
54
+ assert.isTrue(s0.has({ v: 3 }));
55
55
  });
56
56
 
57
57
  test('case 2', () => {
@@ -61,7 +61,7 @@ describe('ISetMapped.has', () => {
61
61
  fromKey,
62
62
  );
63
63
 
64
- expect(s0.has({ v: 4 })).toBe(false);
64
+ assert.isFalse(s0.has({ v: 4 }));
65
65
  });
66
66
 
67
67
  test('case 3', () => {
@@ -71,7 +71,7 @@ describe('ISetMapped.has', () => {
71
71
  fromKey,
72
72
  );
73
73
 
74
- expect(s0.has({ v: 3 })).toBe(false);
74
+ assert.isFalse(s0.has({ v: 3 }));
75
75
  });
76
76
  });
77
77
 
@@ -488,9 +488,9 @@ describe('ISetMapped additional functionality with complex types', () => {
488
488
 
489
489
  expect(set.size).toBe(2);
490
490
 
491
- expect(set.has({ id: 1, type: 'user' })).toBe(true);
491
+ assert.isTrue(set.has({ id: 1, type: 'user' }));
492
492
 
493
- expect(set.has({ id: 2, type: 'admin' })).toBe(true);
493
+ assert.isTrue(set.has({ id: 2, type: 'admin' }));
494
494
  });
495
495
 
496
496
  test('should handle duplicate elements based on mapping', () => {
@@ -528,7 +528,7 @@ describe('ISetMapped additional functionality with complex types', () => {
528
528
  stringToTestElement,
529
529
  );
530
530
 
531
- expect(ISetMapped.equal(set1, set2)).toBe(true);
531
+ assert.isTrue(ISetMapped.equal(set1, set2));
532
532
  });
533
533
 
534
534
  test('should return false for sets with different elements', () => {
@@ -550,7 +550,7 @@ describe('ISetMapped additional functionality with complex types', () => {
550
550
  stringToTestElement,
551
551
  );
552
552
 
553
- expect(ISetMapped.equal(set1, set2)).toBe(false);
553
+ assert.isFalse(ISetMapped.equal(set1, set2));
554
554
  });
555
555
 
556
556
  test('should return true for empty sets', () => {
@@ -566,7 +566,7 @@ describe('ISetMapped additional functionality with complex types', () => {
566
566
  stringToTestElement,
567
567
  );
568
568
 
569
- expect(ISetMapped.equal(set1, set2)).toBe(true);
569
+ assert.isTrue(ISetMapped.equal(set1, set2));
570
570
  });
571
571
  });
572
572
 
@@ -596,11 +596,11 @@ describe('ISetMapped additional functionality with complex types', () => {
596
596
 
597
597
  expect(diff.deleted.size).toBe(1);
598
598
 
599
- expect(diff.deleted.has({ id: 1, type: 'user' })).toBe(true);
599
+ assert.isTrue(diff.deleted.has({ id: 1, type: 'user' }));
600
600
 
601
601
  expect(diff.added.size).toBe(1);
602
602
 
603
- expect(diff.added.has({ id: 4, type: 'user' })).toBe(true);
603
+ assert.isTrue(diff.added.has({ id: 4, type: 'user' }));
604
604
  });
605
605
 
606
606
  test('should handle no changes', () => {
@@ -656,9 +656,9 @@ describe('ISetMapped additional functionality with complex types', () => {
656
656
 
657
657
  expect(intersection.size).toBe(2);
658
658
 
659
- expect(intersection.has({ id: 2, type: 'admin' })).toBe(true);
659
+ assert.isTrue(intersection.has({ id: 2, type: 'admin' }));
660
660
 
661
- expect(intersection.has({ id: 3, type: 'guest' })).toBe(true);
661
+ assert.isTrue(intersection.has({ id: 3, type: 'guest' }));
662
662
  });
663
663
 
664
664
  test('should compute union correctly', () => {
@@ -684,13 +684,13 @@ describe('ISetMapped additional functionality with complex types', () => {
684
684
 
685
685
  expect(union.size).toBe(4);
686
686
 
687
- expect(union.has({ id: 1, type: 'user' })).toBe(true);
687
+ assert.isTrue(union.has({ id: 1, type: 'user' }));
688
688
 
689
- expect(union.has({ id: 2, type: 'admin' })).toBe(true);
689
+ assert.isTrue(union.has({ id: 2, type: 'admin' }));
690
690
 
691
- expect(union.has({ id: 3, type: 'guest' })).toBe(true);
691
+ assert.isTrue(union.has({ id: 3, type: 'guest' }));
692
692
 
693
- expect(union.has({ id: 4, type: 'user' })).toBe(true);
693
+ assert.isTrue(union.has({ id: 4, type: 'user' }));
694
694
  });
695
695
  });
696
696
 
@@ -705,7 +705,7 @@ describe('ISetMapped additional functionality with complex types', () => {
705
705
  stringToTestElement,
706
706
  );
707
707
 
708
- expect(set.every((el) => el.type === 'user')).toBe(true);
708
+ assert.isTrue(set.every((el) => el.type === 'user'));
709
709
  });
710
710
 
711
711
  test('should return false when some elements do not satisfy predicate', () => {
@@ -718,7 +718,7 @@ describe('ISetMapped additional functionality with complex types', () => {
718
718
  stringToTestElement,
719
719
  );
720
720
 
721
- expect(set.every((el) => el.type === 'user')).toBe(false);
721
+ assert.isFalse(set.every((el) => el.type === 'user'));
722
722
  });
723
723
  });
724
724
 
@@ -733,7 +733,7 @@ describe('ISetMapped additional functionality with complex types', () => {
733
733
  stringToTestElement,
734
734
  );
735
735
 
736
- expect(set.some((el) => el.type === 'admin')).toBe(true);
736
+ assert.isTrue(set.some((el) => el.type === 'admin'));
737
737
  });
738
738
 
739
739
  test('should return false when no elements satisfy predicate', () => {
@@ -746,7 +746,7 @@ describe('ISetMapped additional functionality with complex types', () => {
746
746
  stringToTestElement,
747
747
  );
748
748
 
749
- expect(set.some((el) => el.type === 'admin')).toBe(false);
749
+ assert.isFalse(set.some((el) => el.type === 'admin'));
750
750
  });
751
751
  });
752
752
 
@@ -762,9 +762,9 @@ describe('ISetMapped additional functionality with complex types', () => {
762
762
 
763
763
  expect(updated.size).toBe(2);
764
764
 
765
- expect(updated.has({ id: 1, type: 'user' })).toBe(true);
765
+ assert.isTrue(updated.has({ id: 1, type: 'user' }));
766
766
 
767
- expect(updated.has({ id: 2, type: 'admin' })).toBe(true);
767
+ assert.isTrue(updated.has({ id: 2, type: 'admin' }));
768
768
  });
769
769
 
770
770
  test('should return same instance when adding existing element', () => {
@@ -795,9 +795,9 @@ describe('ISetMapped additional functionality with complex types', () => {
795
795
 
796
796
  expect(updated.size).toBe(1);
797
797
 
798
- expect(updated.has({ id: 1, type: 'user' })).toBe(false);
798
+ assert.isFalse(updated.has({ id: 1, type: 'user' }));
799
799
 
800
- expect(updated.has({ id: 2, type: 'admin' })).toBe(true);
800
+ assert.isTrue(updated.has({ id: 2, type: 'admin' }));
801
801
  });
802
802
 
803
803
  test('should return same instance when deleting non-existent element', () => {
@@ -829,11 +829,11 @@ describe('ISetMapped additional functionality with complex types', () => {
829
829
 
830
830
  expect(updated.size).toBe(2);
831
831
 
832
- expect(updated.has({ id: 1, type: 'user' })).toBe(false);
832
+ assert.isFalse(updated.has({ id: 1, type: 'user' }));
833
833
 
834
- expect(updated.has({ id: 2, type: 'admin' })).toBe(true);
834
+ assert.isTrue(updated.has({ id: 2, type: 'admin' }));
835
835
 
836
- expect(updated.has({ id: 3, type: 'guest' })).toBe(true);
836
+ assert.isTrue(updated.has({ id: 3, type: 'guest' }));
837
837
  });
838
838
 
839
839
  test('should handle empty mutations array', () => {
@@ -847,7 +847,7 @@ describe('ISetMapped additional functionality with complex types', () => {
847
847
 
848
848
  expect(updated.size).toBe(1);
849
849
 
850
- expect(ISetMapped.equal(set, updated)).toBe(true);
850
+ assert.isTrue(ISetMapped.equal(set, updated));
851
851
  });
852
852
  });
853
853
 
@@ -869,9 +869,9 @@ describe('ISetMapped additional functionality with complex types', () => {
869
869
 
870
870
  expect(transformed.size).toBe(2);
871
871
 
872
- expect(transformed.has({ id: 1, type: 'USER' })).toBe(true);
872
+ assert.isTrue(transformed.has({ id: 1, type: 'USER' }));
873
873
 
874
- expect(transformed.has({ id: 2, type: 'ADMIN' })).toBe(true);
874
+ assert.isTrue(transformed.has({ id: 2, type: 'ADMIN' }));
875
875
  });
876
876
  });
877
877
 
@@ -891,11 +891,11 @@ describe('ISetMapped additional functionality with complex types', () => {
891
891
 
892
892
  expect(filtered.size).toBe(2);
893
893
 
894
- expect(filtered.has({ id: 1, type: 'user' })).toBe(true);
894
+ assert.isTrue(filtered.has({ id: 1, type: 'user' }));
895
895
 
896
- expect(filtered.has({ id: 3, type: 'user' })).toBe(true);
896
+ assert.isTrue(filtered.has({ id: 3, type: 'user' }));
897
897
 
898
- expect(filtered.has({ id: 2, type: 'admin' })).toBe(false);
898
+ assert.isFalse(filtered.has({ id: 2, type: 'admin' }));
899
899
  });
900
900
  });
901
901
 
@@ -915,11 +915,11 @@ describe('ISetMapped additional functionality with complex types', () => {
915
915
 
916
916
  expect(filtered.size).toBe(1);
917
917
 
918
- expect(filtered.has({ id: 2, type: 'admin' })).toBe(true);
918
+ assert.isTrue(filtered.has({ id: 2, type: 'admin' }));
919
919
 
920
- expect(filtered.has({ id: 1, type: 'user' })).toBe(false);
920
+ assert.isFalse(filtered.has({ id: 1, type: 'user' }));
921
921
 
922
- expect(filtered.has({ id: 3, type: 'user' })).toBe(false);
922
+ assert.isFalse(filtered.has({ id: 3, type: 'user' }));
923
923
  });
924
924
  });
925
925
 
@@ -965,7 +965,7 @@ describe('ISetMapped additional functionality with complex types', () => {
965
965
  stringToTestElement,
966
966
  );
967
967
 
968
- expect(subset.isSubsetOf(superset)).toBe(true);
968
+ assert.isTrue(subset.isSubsetOf(superset));
969
969
  });
970
970
 
971
971
  test('should return false for non-subset', () => {
@@ -987,7 +987,7 @@ describe('ISetMapped additional functionality with complex types', () => {
987
987
  stringToTestElement,
988
988
  );
989
989
 
990
- expect(set1.isSubsetOf(set2)).toBe(false);
990
+ assert.isFalse(set1.isSubsetOf(set2));
991
991
  });
992
992
  });
993
993
 
@@ -1008,7 +1008,7 @@ describe('ISetMapped additional functionality with complex types', () => {
1008
1008
  stringToTestElement,
1009
1009
  );
1010
1010
 
1011
- expect(superset.isSupersetOf(subset)).toBe(true);
1011
+ assert.isTrue(superset.isSupersetOf(subset));
1012
1012
  });
1013
1013
 
1014
1014
  test('should return false for non-superset', () => {
@@ -1030,7 +1030,7 @@ describe('ISetMapped additional functionality with complex types', () => {
1030
1030
  stringToTestElement,
1031
1031
  );
1032
1032
 
1033
- expect(set1.isSupersetOf(set2)).toBe(false);
1033
+ assert.isFalse(set1.isSupersetOf(set2));
1034
1034
  });
1035
1035
  });
1036
1036
 
@@ -1059,11 +1059,11 @@ describe('ISetMapped additional functionality with complex types', () => {
1059
1059
 
1060
1060
  expect(result.size).toBe(2);
1061
1061
 
1062
- expect(result.has({ id: 1, type: 'user' })).toBe(true);
1062
+ assert.isTrue(result.has({ id: 1, type: 'user' }));
1063
1063
 
1064
- expect(result.has({ id: 3, type: 'guest' })).toBe(true);
1064
+ assert.isTrue(result.has({ id: 3, type: 'guest' }));
1065
1065
 
1066
- expect(result.has({ id: 2, type: 'admin' })).toBe(false);
1066
+ assert.isFalse(result.has({ id: 2, type: 'admin' }));
1067
1067
  });
1068
1068
  });
1069
1069
 
@@ -1093,11 +1093,11 @@ describe('ISetMapped additional functionality with complex types', () => {
1093
1093
 
1094
1094
  expect(result.size).toBe(2);
1095
1095
 
1096
- expect(result.has({ id: 2, type: 'admin' })).toBe(true);
1096
+ assert.isTrue(result.has({ id: 2, type: 'admin' }));
1097
1097
 
1098
- expect(result.has({ id: 3, type: 'guest' })).toBe(true);
1098
+ assert.isTrue(result.has({ id: 3, type: 'guest' }));
1099
1099
 
1100
- expect(result.has({ id: 1, type: 'user' })).toBe(false);
1100
+ assert.isFalse(result.has({ id: 1, type: 'user' }));
1101
1101
  });
1102
1102
  });
1103
1103
 
@@ -1125,13 +1125,13 @@ describe('ISetMapped additional functionality with complex types', () => {
1125
1125
 
1126
1126
  expect(result.size).toBe(4);
1127
1127
 
1128
- expect(result.has({ id: 1, type: 'user' })).toBe(true);
1128
+ assert.isTrue(result.has({ id: 1, type: 'user' }));
1129
1129
 
1130
- expect(result.has({ id: 2, type: 'admin' })).toBe(true);
1130
+ assert.isTrue(result.has({ id: 2, type: 'admin' }));
1131
1131
 
1132
- expect(result.has({ id: 3, type: 'guest' })).toBe(true);
1132
+ assert.isTrue(result.has({ id: 3, type: 'guest' }));
1133
1133
 
1134
- expect(result.has({ id: 4, type: 'user' })).toBe(true);
1134
+ assert.isTrue(result.has({ id: 4, type: 'user' }));
1135
1135
  });
1136
1136
  });
1137
1137
 
@@ -1251,9 +1251,9 @@ describe('ISetMapped additional functionality with complex types', () => {
1251
1251
 
1252
1252
  expect(rawSet.size).toBe(2);
1253
1253
 
1254
- expect(rawSet.has('user_1')).toBe(true);
1254
+ assert.isTrue(rawSet.has('user_1'));
1255
1255
 
1256
- expect(rawSet.has('admin_2')).toBe(true);
1256
+ assert.isTrue(rawSet.has('admin_2'));
1257
1257
  });
1258
1258
  });
1259
1259
  });
@@ -39,7 +39,7 @@ type ISetInterface<K extends MapSetKeyType> = Readonly<{
39
39
  * ```ts
40
40
  * const set = ISet.create([1, 2, 3]);
41
41
  *
42
- * assert(set.size === 3);
42
+ * assert.isTrue(set.size === 3);
43
43
  * ```
44
44
  */
45
45
  size: SizeType.Arr;
@@ -54,9 +54,9 @@ type ISetInterface<K extends MapSetKeyType> = Readonly<{
54
54
  *
55
55
  * const filledSet = ISet.create([1, 2]);
56
56
  *
57
- * assert.ok(emptySet.isEmpty);
57
+ * assert.isTrue(emptySet.isEmpty);
58
58
  *
59
- * assert.notOk(filledSet.isEmpty);
59
+ * assert.isFalse(filledSet.isEmpty);
60
60
  * ```
61
61
  */
62
62
  isEmpty: boolean;
@@ -70,9 +70,9 @@ type ISetInterface<K extends MapSetKeyType> = Readonly<{
70
70
  * ```ts
71
71
  * const set = ISet.create(['apple', 'banana']);
72
72
  *
73
- * assert.ok(set.has('apple'));
73
+ * assert.isTrue(set.has('apple'));
74
74
  *
75
- * assert.notOk(set.has('cherry'));
75
+ * assert.isFalse(set.has('cherry'));
76
76
  * ```
77
77
  *
78
78
  * @param key The element to check.
@@ -94,9 +94,9 @@ type ISetInterface<K extends MapSetKeyType> = Readonly<{
94
94
  *
95
95
  * const narrowed = numbers.every((value): value is 2 | 4 | 6 => value % 2 === 0);
96
96
  *
97
- * assert.ok(allEven);
97
+ * assert.isTrue(allEven);
98
98
  *
99
- * assert.ok(narrowed);
99
+ * assert.isTrue(narrowed);
100
100
  * ```
101
101
  *
102
102
  * @param predicate A function to test each element.
@@ -122,9 +122,9 @@ type ISetInterface<K extends MapSetKeyType> = Readonly<{
122
122
  * ```ts
123
123
  * const numbers = ISet.create([1, 3, 5]);
124
124
  *
125
- * assert.ok(numbers.some((value) => value > 4));
125
+ * assert.isTrue(numbers.some((value) => value > 4));
126
126
  *
127
- * assert.notOk(numbers.some((value) => value > 10));
127
+ * assert.isFalse(numbers.some((value) => value > 10));
128
128
  * ```
129
129
  *
130
130
  * @param predicate A function to test each element.
@@ -149,7 +149,7 @@ type ISetInterface<K extends MapSetKeyType> = Readonly<{
149
149
  *
150
150
  * assert.deepStrictEqual(Array.from(withThree), [1, 2, 3]);
151
151
  *
152
- * assert(unchanged === base);
152
+ * assert.isTrue(unchanged === base);
153
153
  * ```
154
154
  *
155
155
  * @param key The element to add.
@@ -171,7 +171,7 @@ type ISetInterface<K extends MapSetKeyType> = Readonly<{
171
171
  *
172
172
  * assert.deepStrictEqual(Array.from(withoutTwo), [1, 3]);
173
173
  *
174
- * assert(unchanged === base);
174
+ * assert.isTrue(unchanged === base);
175
175
  * ```
176
176
  *
177
177
  * @param key The element to delete.
@@ -296,9 +296,9 @@ type ISetInterface<K extends MapSetKeyType> = Readonly<{
296
296
  *
297
297
  * const superset = ISet.create<number>([1, 2, 3]);
298
298
  *
299
- * assert.ok(subset.isSubsetOf(superset));
299
+ * assert.isTrue(subset.isSubsetOf(superset));
300
300
  *
301
- * assert.notOk(superset.isSubsetOf(subset));
301
+ * assert.isFalse(superset.isSubsetOf(subset));
302
302
  * ```
303
303
  *
304
304
  * @param set The other set.
@@ -317,9 +317,9 @@ type ISetInterface<K extends MapSetKeyType> = Readonly<{
317
317
  *
318
318
  * const subset = ISet.create<string>(['a', 'c']);
319
319
  *
320
- * assert.ok(superset.isSupersetOf(subset));
320
+ * assert.isTrue(superset.isSupersetOf(subset));
321
321
  *
322
- * assert.notOk(subset.isSupersetOf(superset));
322
+ * assert.isFalse(subset.isSupersetOf(superset));
323
323
  * ```
324
324
  *
325
325
  * @param set The other set.
@@ -497,9 +497,9 @@ type ISetInterface<K extends MapSetKeyType> = Readonly<{
497
497
  *
498
498
  * const raw = set.toRawSet();
499
499
  *
500
- * assert.ok(is.set(raw));
500
+ * assert.isTrue(is.set(raw));
501
501
  *
502
- * assert.ok(raw.has('alpha'));
502
+ * assert.isTrue(raw.has('alpha'));
503
503
  * ```
504
504
  *
505
505
  * @returns The raw ReadonlySet instance.
@@ -584,9 +584,9 @@ export namespace ISet {
584
584
  *
585
585
  * const third = ISet.create<number>([1, 3]);
586
586
  *
587
- * assert.ok(ISet.equal(first, second));
587
+ * assert.isTrue(ISet.equal(first, second));
588
588
  *
589
- * assert.notOk(ISet.equal(first, third));
589
+ * assert.isFalse(ISet.equal(first, third));
590
590
  * ```
591
591
  *
592
592
  * @template K The type of the elements.