ts-data-forge 5.0.1 → 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 (539) hide show
  1. package/README.md +101 -50
  2. package/dist/array/impl/array-utils-creation.d.mts +14 -0
  3. package/dist/array/impl/array-utils-creation.d.mts.map +1 -1
  4. package/dist/array/impl/array-utils-creation.mjs +12 -0
  5. package/dist/array/impl/array-utils-creation.mjs.map +1 -1
  6. package/dist/array/impl/array-utils-element-access.d.mts +10 -0
  7. package/dist/array/impl/array-utils-element-access.d.mts.map +1 -1
  8. package/dist/array/impl/array-utils-element-access.mjs +6 -0
  9. package/dist/array/impl/array-utils-element-access.mjs.map +1 -1
  10. package/dist/array/impl/array-utils-modification.d.mts +14 -0
  11. package/dist/array/impl/array-utils-modification.d.mts.map +1 -1
  12. package/dist/array/impl/array-utils-modification.mjs.map +1 -1
  13. package/dist/array/impl/array-utils-reducing-value.d.mts +34 -10
  14. package/dist/array/impl/array-utils-reducing-value.d.mts.map +1 -1
  15. package/dist/array/impl/array-utils-reducing-value.mjs.map +1 -1
  16. package/dist/array/impl/array-utils-search.d.mts +34 -4
  17. package/dist/array/impl/array-utils-search.d.mts.map +1 -1
  18. package/dist/array/impl/array-utils-search.mjs.map +1 -1
  19. package/dist/array/impl/array-utils-set-op.d.mts +20 -7
  20. package/dist/array/impl/array-utils-set-op.d.mts.map +1 -1
  21. package/dist/array/impl/array-utils-set-op.mjs +20 -7
  22. package/dist/array/impl/array-utils-set-op.mjs.map +1 -1
  23. package/dist/array/impl/array-utils-size.d.mts +5 -2
  24. package/dist/array/impl/array-utils-size.d.mts.map +1 -1
  25. package/dist/array/impl/array-utils-size.mjs +5 -2
  26. package/dist/array/impl/array-utils-size.mjs.map +1 -1
  27. package/dist/array/impl/array-utils-slice-clamped.d.mts +2 -0
  28. package/dist/array/impl/array-utils-slice-clamped.d.mts.map +1 -1
  29. package/dist/array/impl/array-utils-slice-clamped.mjs.map +1 -1
  30. package/dist/array/impl/array-utils-slicing.d.mts +17 -2
  31. package/dist/array/impl/array-utils-slicing.d.mts.map +1 -1
  32. package/dist/array/impl/array-utils-slicing.mjs +9 -2
  33. package/dist/array/impl/array-utils-slicing.mjs.map +1 -1
  34. package/dist/array/impl/array-utils-transformation.d.mts +27 -0
  35. package/dist/array/impl/array-utils-transformation.d.mts.map +1 -1
  36. package/dist/array/impl/array-utils-transformation.mjs +6 -0
  37. package/dist/array/impl/array-utils-transformation.mjs.map +1 -1
  38. package/dist/array/impl/array-utils-validation.d.mts +35 -18
  39. package/dist/array/impl/array-utils-validation.d.mts.map +1 -1
  40. package/dist/array/impl/array-utils-validation.mjs +25 -14
  41. package/dist/array/impl/array-utils-validation.mjs.map +1 -1
  42. package/dist/collections/imap-mapped.mjs.map +1 -1
  43. package/dist/collections/imap.d.mts +35 -15
  44. package/dist/collections/imap.d.mts.map +1 -1
  45. package/dist/collections/imap.mjs +5 -3
  46. package/dist/collections/imap.mjs.map +1 -1
  47. package/dist/collections/iset-mapped.d.mts +46 -19
  48. package/dist/collections/iset-mapped.d.mts.map +1 -1
  49. package/dist/collections/iset-mapped.mjs +9 -2
  50. package/dist/collections/iset-mapped.mjs.map +1 -1
  51. package/dist/collections/iset.d.mts +48 -19
  52. package/dist/collections/iset.d.mts.map +1 -1
  53. package/dist/collections/iset.mjs +9 -2
  54. package/dist/collections/iset.mjs.map +1 -1
  55. package/dist/collections/queue.d.mts +65 -25
  56. package/dist/collections/queue.d.mts.map +1 -1
  57. package/dist/collections/queue.mjs +13 -5
  58. package/dist/collections/queue.mjs.map +1 -1
  59. package/dist/collections/stack.d.mts +60 -25
  60. package/dist/collections/stack.d.mts.map +1 -1
  61. package/dist/collections/stack.mjs +12 -5
  62. package/dist/collections/stack.mjs.map +1 -1
  63. package/dist/entry-point.mjs +1 -1
  64. package/dist/functional/match.d.mts +1 -1
  65. package/dist/functional/match.d.mts.map +1 -1
  66. package/dist/functional/match.mjs.map +1 -1
  67. package/dist/functional/optional/impl/optional-expect-to-be.d.mts +3 -2
  68. package/dist/functional/optional/impl/optional-expect-to-be.d.mts.map +1 -1
  69. package/dist/functional/optional/impl/optional-expect-to-be.mjs.map +1 -1
  70. package/dist/functional/optional/impl/optional-filter.d.mts +3 -0
  71. package/dist/functional/optional/impl/optional-filter.d.mts.map +1 -1
  72. package/dist/functional/optional/impl/optional-filter.mjs.map +1 -1
  73. package/dist/functional/optional/impl/optional-flat-map.d.mts +2 -0
  74. package/dist/functional/optional/impl/optional-flat-map.d.mts.map +1 -1
  75. package/dist/functional/optional/impl/optional-flat-map.mjs.map +1 -1
  76. package/dist/functional/optional/impl/optional-from-nullable.d.mts +2 -0
  77. package/dist/functional/optional/impl/optional-from-nullable.d.mts.map +1 -1
  78. package/dist/functional/optional/impl/optional-from-nullable.mjs +2 -0
  79. package/dist/functional/optional/impl/optional-from-nullable.mjs.map +1 -1
  80. package/dist/functional/optional/impl/optional-is-none.d.mts +1 -1
  81. package/dist/functional/optional/impl/optional-is-none.mjs +1 -1
  82. package/dist/functional/optional/impl/optional-is-optional.d.mts +4 -2
  83. package/dist/functional/optional/impl/optional-is-optional.d.mts.map +1 -1
  84. package/dist/functional/optional/impl/optional-is-optional.mjs +4 -2
  85. package/dist/functional/optional/impl/optional-is-optional.mjs.map +1 -1
  86. package/dist/functional/optional/impl/optional-is-some.d.mts +2 -1
  87. package/dist/functional/optional/impl/optional-is-some.d.mts.map +1 -1
  88. package/dist/functional/optional/impl/optional-is-some.mjs +2 -1
  89. package/dist/functional/optional/impl/optional-is-some.mjs.map +1 -1
  90. package/dist/functional/optional/impl/optional-map.d.mts +2 -0
  91. package/dist/functional/optional/impl/optional-map.d.mts.map +1 -1
  92. package/dist/functional/optional/impl/optional-map.mjs.map +1 -1
  93. package/dist/functional/optional/impl/optional-none.d.mts +4 -2
  94. package/dist/functional/optional/impl/optional-none.d.mts.map +1 -1
  95. package/dist/functional/optional/impl/optional-none.mjs +4 -2
  96. package/dist/functional/optional/impl/optional-none.mjs.map +1 -1
  97. package/dist/functional/optional/impl/optional-or-else.d.mts +4 -0
  98. package/dist/functional/optional/impl/optional-or-else.d.mts.map +1 -1
  99. package/dist/functional/optional/impl/optional-or-else.mjs.map +1 -1
  100. package/dist/functional/optional/impl/optional-some.d.mts +5 -3
  101. package/dist/functional/optional/impl/optional-some.d.mts.map +1 -1
  102. package/dist/functional/optional/impl/optional-some.mjs +4 -2
  103. package/dist/functional/optional/impl/optional-some.mjs.map +1 -1
  104. package/dist/functional/optional/impl/optional-to-nullable.d.mts +4 -2
  105. package/dist/functional/optional/impl/optional-to-nullable.d.mts.map +1 -1
  106. package/dist/functional/optional/impl/optional-to-nullable.mjs +4 -2
  107. package/dist/functional/optional/impl/optional-to-nullable.mjs.map +1 -1
  108. package/dist/functional/optional/impl/optional-unwrap-or.d.mts +7 -4
  109. package/dist/functional/optional/impl/optional-unwrap-or.d.mts.map +1 -1
  110. package/dist/functional/optional/impl/optional-unwrap-or.mjs.map +1 -1
  111. package/dist/functional/optional/impl/optional-unwrap-throw.d.mts +2 -1
  112. package/dist/functional/optional/impl/optional-unwrap-throw.d.mts.map +1 -1
  113. package/dist/functional/optional/impl/optional-unwrap-throw.mjs +2 -1
  114. package/dist/functional/optional/impl/optional-unwrap-throw.mjs.map +1 -1
  115. package/dist/functional/optional/impl/optional-unwrap.d.mts +4 -2
  116. package/dist/functional/optional/impl/optional-unwrap.d.mts.map +1 -1
  117. package/dist/functional/optional/impl/optional-unwrap.mjs.map +1 -1
  118. package/dist/functional/optional/impl/optional-zip.d.mts +3 -1
  119. package/dist/functional/optional/impl/optional-zip.d.mts.map +1 -1
  120. package/dist/functional/optional/impl/optional-zip.mjs +3 -1
  121. package/dist/functional/optional/impl/optional-zip.mjs.map +1 -1
  122. package/dist/functional/pipe.d.mts +2 -2
  123. package/dist/functional/result/impl/result-err.d.mts +4 -2
  124. package/dist/functional/result/impl/result-err.d.mts.map +1 -1
  125. package/dist/functional/result/impl/result-err.mjs +3 -1
  126. package/dist/functional/result/impl/result-err.mjs.map +1 -1
  127. package/dist/functional/result/impl/result-expect-to-be.d.mts +3 -2
  128. package/dist/functional/result/impl/result-expect-to-be.d.mts.map +1 -1
  129. package/dist/functional/result/impl/result-expect-to-be.mjs.map +1 -1
  130. package/dist/functional/result/impl/result-flat-map.d.mts +5 -0
  131. package/dist/functional/result/impl/result-flat-map.d.mts.map +1 -1
  132. package/dist/functional/result/impl/result-flat-map.mjs.map +1 -1
  133. package/dist/functional/result/impl/result-fold.d.mts +4 -0
  134. package/dist/functional/result/impl/result-fold.d.mts.map +1 -1
  135. package/dist/functional/result/impl/result-fold.mjs.map +1 -1
  136. package/dist/functional/result/impl/result-from-promise.d.mts +4 -1
  137. package/dist/functional/result/impl/result-from-promise.d.mts.map +1 -1
  138. package/dist/functional/result/impl/result-from-promise.mjs +4 -1
  139. package/dist/functional/result/impl/result-from-promise.mjs.map +1 -1
  140. package/dist/functional/result/impl/result-from-throwable.d.mts +3 -1
  141. package/dist/functional/result/impl/result-from-throwable.d.mts.map +1 -1
  142. package/dist/functional/result/impl/result-from-throwable.mjs +3 -1
  143. package/dist/functional/result/impl/result-from-throwable.mjs.map +1 -1
  144. package/dist/functional/result/impl/result-is-err.d.mts +4 -2
  145. package/dist/functional/result/impl/result-is-err.d.mts.map +1 -1
  146. package/dist/functional/result/impl/result-is-err.mjs +4 -2
  147. package/dist/functional/result/impl/result-is-err.mjs.map +1 -1
  148. package/dist/functional/result/impl/result-is-ok.d.mts +4 -2
  149. package/dist/functional/result/impl/result-is-ok.d.mts.map +1 -1
  150. package/dist/functional/result/impl/result-is-ok.mjs +4 -2
  151. package/dist/functional/result/impl/result-is-ok.mjs.map +1 -1
  152. package/dist/functional/result/impl/result-is-result.d.mts +7 -3
  153. package/dist/functional/result/impl/result-is-result.d.mts.map +1 -1
  154. package/dist/functional/result/impl/result-is-result.mjs +7 -3
  155. package/dist/functional/result/impl/result-is-result.mjs.map +1 -1
  156. package/dist/functional/result/impl/result-map-err.d.mts +3 -0
  157. package/dist/functional/result/impl/result-map-err.d.mts.map +1 -1
  158. package/dist/functional/result/impl/result-map-err.mjs.map +1 -1
  159. package/dist/functional/result/impl/result-map.d.mts +4 -0
  160. package/dist/functional/result/impl/result-map.d.mts.map +1 -1
  161. package/dist/functional/result/impl/result-map.mjs.map +1 -1
  162. package/dist/functional/result/impl/result-ok.d.mts +4 -2
  163. package/dist/functional/result/impl/result-ok.d.mts.map +1 -1
  164. package/dist/functional/result/impl/result-ok.mjs +3 -1
  165. package/dist/functional/result/impl/result-ok.mjs.map +1 -1
  166. package/dist/functional/result/impl/result-or-else.d.mts +4 -0
  167. package/dist/functional/result/impl/result-or-else.d.mts.map +1 -1
  168. package/dist/functional/result/impl/result-or-else.mjs.map +1 -1
  169. package/dist/functional/result/impl/result-swap.d.mts +2 -0
  170. package/dist/functional/result/impl/result-swap.d.mts.map +1 -1
  171. package/dist/functional/result/impl/result-swap.mjs +2 -0
  172. package/dist/functional/result/impl/result-swap.mjs.map +1 -1
  173. package/dist/functional/result/impl/result-to-optional.d.mts +2 -0
  174. package/dist/functional/result/impl/result-to-optional.d.mts.map +1 -1
  175. package/dist/functional/result/impl/result-to-optional.mjs +2 -0
  176. package/dist/functional/result/impl/result-to-optional.mjs.map +1 -1
  177. package/dist/functional/result/impl/result-unwrap-err-or.d.mts +7 -4
  178. package/dist/functional/result/impl/result-unwrap-err-or.d.mts.map +1 -1
  179. package/dist/functional/result/impl/result-unwrap-err-or.mjs.map +1 -1
  180. package/dist/functional/result/impl/result-unwrap-err-throw.d.mts +3 -1
  181. package/dist/functional/result/impl/result-unwrap-err-throw.d.mts.map +1 -1
  182. package/dist/functional/result/impl/result-unwrap-err-throw.mjs +3 -1
  183. package/dist/functional/result/impl/result-unwrap-err-throw.mjs.map +1 -1
  184. package/dist/functional/result/impl/result-unwrap-err.d.mts +3 -2
  185. package/dist/functional/result/impl/result-unwrap-err.d.mts.map +1 -1
  186. package/dist/functional/result/impl/result-unwrap-err.mjs +3 -2
  187. package/dist/functional/result/impl/result-unwrap-err.mjs.map +1 -1
  188. package/dist/functional/result/impl/result-unwrap-ok-or.d.mts +7 -4
  189. package/dist/functional/result/impl/result-unwrap-ok-or.d.mts.map +1 -1
  190. package/dist/functional/result/impl/result-unwrap-ok-or.mjs.map +1 -1
  191. package/dist/functional/result/impl/result-unwrap-ok.d.mts +3 -2
  192. package/dist/functional/result/impl/result-unwrap-ok.d.mts.map +1 -1
  193. package/dist/functional/result/impl/result-unwrap-ok.mjs.map +1 -1
  194. package/dist/functional/result/impl/result-unwrap-throw.d.mts +3 -1
  195. package/dist/functional/result/impl/result-unwrap-throw.d.mts.map +1 -1
  196. package/dist/functional/result/impl/result-unwrap-throw.mjs +3 -1
  197. package/dist/functional/result/impl/result-unwrap-throw.mjs.map +1 -1
  198. package/dist/functional/result/impl/result-zip.d.mts +3 -1
  199. package/dist/functional/result/impl/result-zip.d.mts.map +1 -1
  200. package/dist/functional/result/impl/result-zip.mjs +3 -1
  201. package/dist/functional/result/impl/result-zip.mjs.map +1 -1
  202. package/dist/functional/ternary-result/impl/ternary-result-err.d.mts +3 -2
  203. package/dist/functional/ternary-result/impl/ternary-result-err.d.mts.map +1 -1
  204. package/dist/functional/ternary-result/impl/ternary-result-err.mjs +2 -1
  205. package/dist/functional/ternary-result/impl/ternary-result-err.mjs.map +1 -1
  206. package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.d.mts +1 -0
  207. package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.d.mts.map +1 -1
  208. package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.mjs.map +1 -1
  209. package/dist/functional/ternary-result/impl/ternary-result-flat-map.d.mts +4 -0
  210. package/dist/functional/ternary-result/impl/ternary-result-flat-map.d.mts.map +1 -1
  211. package/dist/functional/ternary-result/impl/ternary-result-flat-map.mjs.map +1 -1
  212. package/dist/functional/ternary-result/impl/ternary-result-fold.d.mts +2 -0
  213. package/dist/functional/ternary-result/impl/ternary-result-fold.d.mts.map +1 -1
  214. package/dist/functional/ternary-result/impl/ternary-result-fold.mjs.map +1 -1
  215. package/dist/functional/ternary-result/impl/ternary-result-from-promise.d.mts +3 -1
  216. package/dist/functional/ternary-result/impl/ternary-result-from-promise.d.mts.map +1 -1
  217. package/dist/functional/ternary-result/impl/ternary-result-from-promise.mjs +3 -1
  218. package/dist/functional/ternary-result/impl/ternary-result-from-promise.mjs.map +1 -1
  219. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.d.mts +3 -1
  220. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.d.mts.map +1 -1
  221. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs +3 -1
  222. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs.map +1 -1
  223. package/dist/functional/ternary-result/impl/ternary-result-is-ok.d.mts +1 -0
  224. package/dist/functional/ternary-result/impl/ternary-result-is-ok.d.mts.map +1 -1
  225. package/dist/functional/ternary-result/impl/ternary-result-is-ok.mjs +1 -0
  226. package/dist/functional/ternary-result/impl/ternary-result-is-ok.mjs.map +1 -1
  227. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.d.mts +7 -3
  228. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.d.mts.map +1 -1
  229. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.mjs +7 -3
  230. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.mjs.map +1 -1
  231. package/dist/functional/ternary-result/impl/ternary-result-is-warn.d.mts +1 -0
  232. package/dist/functional/ternary-result/impl/ternary-result-is-warn.d.mts.map +1 -1
  233. package/dist/functional/ternary-result/impl/ternary-result-is-warn.mjs +1 -0
  234. package/dist/functional/ternary-result/impl/ternary-result-is-warn.mjs.map +1 -1
  235. package/dist/functional/ternary-result/impl/ternary-result-map-err.d.mts +3 -0
  236. package/dist/functional/ternary-result/impl/ternary-result-map-err.d.mts.map +1 -1
  237. package/dist/functional/ternary-result/impl/ternary-result-map-err.mjs.map +1 -1
  238. package/dist/functional/ternary-result/impl/ternary-result-map-warn.d.mts +3 -0
  239. package/dist/functional/ternary-result/impl/ternary-result-map-warn.d.mts.map +1 -1
  240. package/dist/functional/ternary-result/impl/ternary-result-map-warn.mjs.map +1 -1
  241. package/dist/functional/ternary-result/impl/ternary-result-map.d.mts +6 -0
  242. package/dist/functional/ternary-result/impl/ternary-result-map.d.mts.map +1 -1
  243. package/dist/functional/ternary-result/impl/ternary-result-map.mjs.map +1 -1
  244. package/dist/functional/ternary-result/impl/ternary-result-ok.d.mts +1 -1
  245. package/dist/functional/ternary-result/impl/ternary-result-ok.d.mts.map +1 -1
  246. package/dist/functional/ternary-result/impl/ternary-result-ok.mjs.map +1 -1
  247. package/dist/functional/ternary-result/impl/ternary-result-or-else.d.mts +2 -0
  248. package/dist/functional/ternary-result/impl/ternary-result-or-else.d.mts.map +1 -1
  249. package/dist/functional/ternary-result/impl/ternary-result-or-else.mjs.map +1 -1
  250. package/dist/functional/ternary-result/impl/ternary-result-to-optional.d.mts +2 -0
  251. package/dist/functional/ternary-result/impl/ternary-result-to-optional.d.mts.map +1 -1
  252. package/dist/functional/ternary-result/impl/ternary-result-to-optional.mjs +2 -0
  253. package/dist/functional/ternary-result/impl/ternary-result-to-optional.mjs.map +1 -1
  254. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.d.mts +2 -0
  255. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.d.mts.map +1 -1
  256. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.mjs.map +1 -1
  257. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.d.mts +1 -0
  258. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.d.mts.map +1 -1
  259. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mjs +1 -0
  260. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mjs.map +1 -1
  261. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.d.mts +2 -0
  262. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.d.mts.map +1 -1
  263. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.mjs +2 -0
  264. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.mjs.map +1 -1
  265. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.d.mts +2 -0
  266. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.d.mts.map +1 -1
  267. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mjs.map +1 -1
  268. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.d.mts +2 -0
  269. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.d.mts.map +1 -1
  270. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.mjs.map +1 -1
  271. package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.d.mts +1 -0
  272. package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.d.mts.map +1 -1
  273. package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.mjs +1 -0
  274. package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.mjs.map +1 -1
  275. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.d.mts +2 -0
  276. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.d.mts.map +1 -1
  277. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mjs.map +1 -1
  278. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.d.mts +1 -0
  279. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.d.mts.map +1 -1
  280. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mjs +1 -0
  281. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mjs.map +1 -1
  282. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.d.mts +2 -0
  283. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.d.mts.map +1 -1
  284. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.mjs +2 -0
  285. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.mjs.map +1 -1
  286. package/dist/functional/ternary-result/impl/ternary-result-warn.d.mts +1 -1
  287. package/dist/functional/ternary-result/impl/ternary-result-warn.d.mts.map +1 -1
  288. package/dist/functional/ternary-result/impl/ternary-result-warn.mjs.map +1 -1
  289. package/dist/functional/ternary-result/impl/ternary-result-zip.d.mts +4 -0
  290. package/dist/functional/ternary-result/impl/ternary-result-zip.d.mts.map +1 -1
  291. package/dist/functional/ternary-result/impl/ternary-result-zip.mjs +4 -0
  292. package/dist/functional/ternary-result/impl/ternary-result-zip.mjs.map +1 -1
  293. package/dist/globals.d.mts +12 -1
  294. package/dist/guard/has-key.d.mts +6 -3
  295. package/dist/guard/has-key.d.mts.map +1 -1
  296. package/dist/guard/has-key.mjs +2 -2
  297. package/dist/guard/index.mjs +1 -1
  298. package/dist/guard/is-record.d.mts +31 -0
  299. package/dist/guard/is-record.d.mts.map +1 -1
  300. package/dist/guard/is-record.mjs +32 -1
  301. package/dist/guard/is-record.mjs.map +1 -1
  302. package/dist/guard/is-type.d.mts +3 -0
  303. package/dist/guard/is-type.d.mts.map +1 -1
  304. package/dist/guard/is-type.mjs +3 -0
  305. package/dist/guard/is-type.mjs.map +1 -1
  306. package/dist/guard/key-is-in.d.mts +3 -2
  307. package/dist/guard/key-is-in.d.mts.map +1 -1
  308. package/dist/guard/key-is-in.mjs +3 -2
  309. package/dist/guard/key-is-in.mjs.map +1 -1
  310. package/dist/index.mjs +1 -1
  311. package/dist/iterator/range.d.mts +4 -0
  312. package/dist/iterator/range.d.mts.map +1 -1
  313. package/dist/iterator/range.mjs +1 -0
  314. package/dist/iterator/range.mjs.map +1 -1
  315. package/dist/json/json.d.mts +42 -21
  316. package/dist/json/json.d.mts.map +1 -1
  317. package/dist/json/json.mjs +42 -21
  318. package/dist/json/json.mjs.map +1 -1
  319. package/dist/number/branded-types/int.d.mts +33 -19
  320. package/dist/number/branded-types/int.d.mts.map +1 -1
  321. package/dist/number/branded-types/int.mjs +33 -19
  322. package/dist/number/branded-types/int.mjs.map +1 -1
  323. package/dist/number/branded-types/non-zero-safe-int.mjs +2 -2
  324. package/dist/number/branded-types/positive-int.d.mts +34 -20
  325. package/dist/number/branded-types/positive-int.d.mts.map +1 -1
  326. package/dist/number/branded-types/positive-int.mjs +34 -20
  327. package/dist/number/branded-types/positive-int.mjs.map +1 -1
  328. package/dist/number/branded-types/positive-safe-int.d.mts +47 -26
  329. package/dist/number/branded-types/positive-safe-int.d.mts.map +1 -1
  330. package/dist/number/branded-types/positive-safe-int.mjs +48 -27
  331. package/dist/number/branded-types/positive-safe-int.mjs.map +1 -1
  332. package/dist/number/branded-types/safe-int.d.mts +48 -27
  333. package/dist/number/branded-types/safe-int.d.mts.map +1 -1
  334. package/dist/number/branded-types/safe-int.mjs +50 -29
  335. package/dist/number/branded-types/safe-int.mjs.map +1 -1
  336. package/dist/number/branded-types/safe-uint.mjs +1 -1
  337. package/dist/number/branded-types/uint.d.mts +31 -19
  338. package/dist/number/branded-types/uint.d.mts.map +1 -1
  339. package/dist/number/branded-types/uint.mjs +31 -19
  340. package/dist/number/branded-types/uint.mjs.map +1 -1
  341. package/dist/number/num.d.mts +29 -20
  342. package/dist/number/num.d.mts.map +1 -1
  343. package/dist/number/num.mjs +24 -17
  344. package/dist/number/num.mjs.map +1 -1
  345. package/dist/number/refined-number-utils.d.mts +33 -11
  346. package/dist/number/refined-number-utils.d.mts.map +1 -1
  347. package/dist/number/refined-number-utils.mjs +33 -11
  348. package/dist/number/refined-number-utils.mjs.map +1 -1
  349. package/dist/object/object.d.mts +12 -3
  350. package/dist/object/object.d.mts.map +1 -1
  351. package/dist/object/object.mjs +10 -3
  352. package/dist/object/object.mjs.map +1 -1
  353. package/dist/others/map-nullable.mjs.map +1 -1
  354. package/dist/others/tuple.d.mts +14 -3
  355. package/dist/others/tuple.d.mts.map +1 -1
  356. package/dist/others/tuple.mjs +14 -3
  357. package/dist/others/tuple.mjs.map +1 -1
  358. package/dist/others/unknown-to-string.d.mts.map +1 -1
  359. package/dist/others/unknown-to-string.mjs.map +1 -1
  360. package/dist/promise/promise.d.mts +8 -4
  361. package/dist/promise/promise.d.mts.map +1 -1
  362. package/dist/promise/promise.mjs +8 -4
  363. package/dist/promise/promise.mjs.map +1 -1
  364. package/package.json +26 -28
  365. package/src/array/impl/array-utils-creation.mts +20 -0
  366. package/src/array/impl/array-utils-creation.test.mts +72 -1
  367. package/src/array/impl/array-utils-element-access.mts +13 -0
  368. package/src/array/impl/array-utils-element-access.test.mts +36 -15
  369. package/src/array/impl/array-utils-iterators.test.mts +17 -0
  370. package/src/array/impl/array-utils-modification.mts +78 -19
  371. package/src/array/impl/array-utils-modification.test.mts +75 -0
  372. package/src/array/impl/array-utils-overload-type-error.test.mts +19 -0
  373. package/src/array/impl/array-utils-reducing-value.mts +61 -16
  374. package/src/array/impl/array-utils-reducing-value.test.mts +107 -25
  375. package/src/array/impl/array-utils-search.mts +57 -4
  376. package/src/array/impl/array-utils-search.test.mts +61 -10
  377. package/src/array/impl/array-utils-set-op.mts +26 -7
  378. package/src/array/impl/array-utils-set-op.test.mts +129 -13
  379. package/src/array/impl/array-utils-size.mts +5 -2
  380. package/src/array/impl/array-utils-size.test.mts +1 -0
  381. package/src/array/impl/array-utils-slice-clamped.mts +7 -0
  382. package/src/array/impl/array-utils-slice-clamped.test.mts +20 -0
  383. package/src/array/impl/array-utils-slicing.mts +29 -2
  384. package/src/array/impl/array-utils-slicing.test.mts +57 -0
  385. package/src/array/impl/array-utils-transformation.mts +58 -0
  386. package/src/array/impl/array-utils-transformation.test.mts +115 -3
  387. package/src/array/impl/array-utils-validation.mts +41 -18
  388. package/src/array/impl/array-utils-validation.test.mts +176 -78
  389. package/src/array/impl/array.test.mts +18 -6
  390. package/src/collections/imap-mapped.mts +11 -0
  391. package/src/collections/imap-mapped.test.mts +86 -18
  392. package/src/collections/imap.mts +47 -15
  393. package/src/collections/imap.test.mts +137 -31
  394. package/src/collections/iset-mapped.mts +54 -19
  395. package/src/collections/iset-mapped.test.mts +163 -52
  396. package/src/collections/iset.mts +53 -19
  397. package/src/collections/iset.test.mts +323 -130
  398. package/src/collections/queue.mts +78 -25
  399. package/src/collections/queue.test.mts +65 -35
  400. package/src/collections/stack.mts +67 -25
  401. package/src/collections/stack.test.mts +59 -15
  402. package/src/functional/match.mts +17 -1
  403. package/src/functional/match.test.mts +2 -0
  404. package/src/functional/optional/impl/optional-expect-to-be.mts +5 -2
  405. package/src/functional/optional/impl/optional-filter.mts +6 -0
  406. package/src/functional/optional/impl/optional-flat-map.mts +4 -0
  407. package/src/functional/optional/impl/optional-from-nullable.mts +2 -0
  408. package/src/functional/optional/impl/optional-is-none.mts +1 -1
  409. package/src/functional/optional/impl/optional-is-optional.mts +4 -2
  410. package/src/functional/optional/impl/optional-is-some.mts +2 -1
  411. package/src/functional/optional/impl/optional-map.mts +5 -0
  412. package/src/functional/optional/impl/optional-none.mts +4 -2
  413. package/src/functional/optional/impl/optional-or-else.mts +6 -0
  414. package/src/functional/optional/impl/optional-some.mts +5 -3
  415. package/src/functional/optional/impl/optional-to-nullable.mts +4 -2
  416. package/src/functional/optional/impl/optional-unwrap-or.mts +9 -4
  417. package/src/functional/optional/impl/optional-unwrap-throw.mts +2 -1
  418. package/src/functional/optional/impl/optional-unwrap.mts +4 -2
  419. package/src/functional/optional/impl/optional-zip.mts +3 -1
  420. package/src/functional/optional.test.mts +126 -54
  421. package/src/functional/pipe.mts +2 -2
  422. package/src/functional/pipe.test.mts +7 -4
  423. package/src/functional/result/impl/result-err.mts +4 -2
  424. package/src/functional/result/impl/result-expect-to-be.mts +5 -2
  425. package/src/functional/result/impl/result-flat-map.mts +7 -0
  426. package/src/functional/result/impl/result-fold.mts +6 -0
  427. package/src/functional/result/impl/result-from-promise.mts +4 -1
  428. package/src/functional/result/impl/result-from-throwable.mts +5 -1
  429. package/src/functional/result/impl/result-is-err.mts +4 -2
  430. package/src/functional/result/impl/result-is-ok.mts +4 -2
  431. package/src/functional/result/impl/result-is-result.mts +7 -3
  432. package/src/functional/result/impl/result-map-err.mts +5 -0
  433. package/src/functional/result/impl/result-map.mts +6 -0
  434. package/src/functional/result/impl/result-ok.mts +4 -2
  435. package/src/functional/result/impl/result-or-else.mts +6 -0
  436. package/src/functional/result/impl/result-swap.mts +2 -0
  437. package/src/functional/result/impl/result-to-optional.mts +2 -0
  438. package/src/functional/result/impl/result-unwrap-err-or.mts +9 -4
  439. package/src/functional/result/impl/result-unwrap-err-throw.mts +3 -1
  440. package/src/functional/result/impl/result-unwrap-err.mts +3 -2
  441. package/src/functional/result/impl/result-unwrap-ok-or.mts +9 -4
  442. package/src/functional/result/impl/result-unwrap-ok.mts +4 -2
  443. package/src/functional/result/impl/result-unwrap-throw.mts +3 -1
  444. package/src/functional/result/impl/result-zip.mts +3 -1
  445. package/src/functional/result.test.mts +182 -152
  446. package/src/functional/ternary-result/impl/ternary-result-err.mts +3 -2
  447. package/src/functional/ternary-result/impl/ternary-result-expect-to-be.mts +4 -0
  448. package/src/functional/ternary-result/impl/ternary-result-flat-map.mts +7 -0
  449. package/src/functional/ternary-result/impl/ternary-result-fold.mts +5 -0
  450. package/src/functional/ternary-result/impl/ternary-result-from-promise.mts +3 -1
  451. package/src/functional/ternary-result/impl/ternary-result-from-throwable.mts +4 -1
  452. package/src/functional/ternary-result/impl/ternary-result-is-ok.mts +1 -0
  453. package/src/functional/ternary-result/impl/ternary-result-is-ternary-result.mts +7 -3
  454. package/src/functional/ternary-result/impl/ternary-result-is-warn.mts +1 -0
  455. package/src/functional/ternary-result/impl/ternary-result-map-err.mts +6 -0
  456. package/src/functional/ternary-result/impl/ternary-result-map-warn.mts +6 -0
  457. package/src/functional/ternary-result/impl/ternary-result-map.mts +9 -0
  458. package/src/functional/ternary-result/impl/ternary-result-ok.mts +1 -1
  459. package/src/functional/ternary-result/impl/ternary-result-or-else.mts +5 -0
  460. package/src/functional/ternary-result/impl/ternary-result-to-optional.mts +2 -0
  461. package/src/functional/ternary-result/impl/ternary-result-unwrap-err-or.mts +5 -0
  462. package/src/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mts +1 -0
  463. package/src/functional/ternary-result/impl/ternary-result-unwrap-err.mts +2 -0
  464. package/src/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mts +5 -0
  465. package/src/functional/ternary-result/impl/ternary-result-unwrap-ok.mts +3 -0
  466. package/src/functional/ternary-result/impl/ternary-result-unwrap-throw.mts +1 -0
  467. package/src/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mts +5 -0
  468. package/src/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mts +1 -0
  469. package/src/functional/ternary-result/impl/ternary-result-unwrap-warn.mts +2 -0
  470. package/src/functional/ternary-result/impl/ternary-result-warn.mts +4 -1
  471. package/src/functional/ternary-result/impl/ternary-result-zip.mts +4 -0
  472. package/src/functional/ternary-result.test.mts +99 -8
  473. package/src/globals.d.mts +12 -1
  474. package/src/guard/has-key.mts +8 -5
  475. package/src/guard/has-key.test.mts +9 -5
  476. package/src/guard/is-error.test.mts +143 -0
  477. package/src/guard/is-non-empty-string.test.mts +44 -24
  478. package/src/guard/is-non-null-object.test.mts +45 -26
  479. package/src/guard/is-primitive.test.mts +51 -28
  480. package/src/guard/is-record.mts +34 -0
  481. package/src/guard/is-record.test.mts +28 -7
  482. package/src/guard/is-type.mts +3 -0
  483. package/src/guard/is-type.test.mts +285 -155
  484. package/src/guard/key-is-in.mts +3 -2
  485. package/src/guard/key-is-in.test.mts +2 -2
  486. package/src/iterator/range.mts +9 -0
  487. package/src/json/json.mts +50 -21
  488. package/src/json/json.test.mts +224 -176
  489. package/src/number/branded-types/finite-number.test.mts +51 -11
  490. package/src/number/branded-types/int.mts +33 -19
  491. package/src/number/branded-types/int.test.mts +56 -14
  492. package/src/number/branded-types/int16.test.mts +63 -16
  493. package/src/number/branded-types/int32.test.mts +63 -16
  494. package/src/number/branded-types/non-negative-finite-number.test.mts +52 -12
  495. package/src/number/branded-types/non-negative-int16.test.mts +59 -16
  496. package/src/number/branded-types/non-negative-int32.test.mts +59 -16
  497. package/src/number/branded-types/non-zero-finite-number.test.mts +65 -14
  498. package/src/number/branded-types/non-zero-int.test.mts +72 -19
  499. package/src/number/branded-types/non-zero-int16.test.mts +60 -16
  500. package/src/number/branded-types/non-zero-int32.test.mts +60 -16
  501. package/src/number/branded-types/non-zero-safe-int.mts +2 -2
  502. package/src/number/branded-types/non-zero-safe-int.test.mts +85 -23
  503. package/src/number/branded-types/non-zero-uint16.test.mts +53 -16
  504. package/src/number/branded-types/non-zero-uint32.test.mts +53 -16
  505. package/src/number/branded-types/positive-finite-number.test.mts +59 -14
  506. package/src/number/branded-types/positive-int.mts +34 -20
  507. package/src/number/branded-types/positive-int.test.mts +64 -17
  508. package/src/number/branded-types/positive-int16.test.mts +50 -15
  509. package/src/number/branded-types/positive-int32.test.mts +50 -15
  510. package/src/number/branded-types/positive-safe-int.mts +48 -27
  511. package/src/number/branded-types/positive-safe-int.test.mts +68 -19
  512. package/src/number/branded-types/positive-uint16.test.mts +53 -16
  513. package/src/number/branded-types/positive-uint32.test.mts +53 -16
  514. package/src/number/branded-types/safe-int.mts +50 -29
  515. package/src/number/branded-types/safe-int.test.mts +70 -18
  516. package/src/number/branded-types/safe-uint.mts +1 -1
  517. package/src/number/branded-types/safe-uint.test.mts +65 -17
  518. package/src/number/branded-types/uint.mts +31 -19
  519. package/src/number/branded-types/uint.test.mts +58 -15
  520. package/src/number/branded-types/uint16.test.mts +56 -15
  521. package/src/number/branded-types/uint32.test.mts +56 -15
  522. package/src/number/enum/int8.test.mts +7 -1
  523. package/src/number/enum/uint8.test.mts +7 -1
  524. package/src/number/num.mts +32 -21
  525. package/src/number/num.test.mts +88 -26
  526. package/src/number/refined-number-utils.mts +38 -13
  527. package/src/object/object.mts +19 -3
  528. package/src/object/object.test.mts +16 -6
  529. package/src/others/cast-mutable.test.mts +8 -1
  530. package/src/others/cast-readonly.test.mts +21 -4
  531. package/src/others/if-then.test.mts +40 -24
  532. package/src/others/map-nullable.mts +3 -0
  533. package/src/others/map-nullable.test.mts +27 -0
  534. package/src/others/memoize-function.test.mts +41 -0
  535. package/src/others/tuple.mts +14 -3
  536. package/src/others/unknown-to-string.mts +2 -0
  537. package/src/others/unknown-to-string.test.mts +10 -0
  538. package/src/promise/promise.mts +8 -4
  539. package/src/promise/promise.test.mts +8 -13
@@ -1,14 +1,18 @@
1
1
  import { ISetMapped } from './iset-mapped.mjs';
2
2
 
3
3
  const toKey = (a: Readonly<{ v: number }>): number => a.v;
4
+
4
5
  const fromKey = (k: number): Readonly<{ v: number }> => ({ v: k });
5
6
 
6
7
  // Test types for additional functionality
7
8
  type TestElement = { id: number; type: string };
9
+
8
10
  const testElementToString = (el: Readonly<TestElement>): string =>
9
11
  `${el.type}_${el.id}`;
12
+
10
13
  const stringToTestElement = (str: string): TestElement => {
11
14
  const [type, idStr] = str.split('_');
15
+
12
16
  return { type: type ?? '', id: Number(idStr ?? '0') };
13
17
  };
14
18
 
@@ -47,7 +51,7 @@ describe('ISetMapped.has', () => {
47
51
  fromKey,
48
52
  );
49
53
 
50
- expect(s0.has({ v: 3 })).toBe(true);
54
+ assert.isTrue(s0.has({ v: 3 }));
51
55
  });
52
56
 
53
57
  test('case 2', () => {
@@ -57,7 +61,7 @@ describe('ISetMapped.has', () => {
57
61
  fromKey,
58
62
  );
59
63
 
60
- expect(s0.has({ v: 4 })).toBe(false);
64
+ assert.isFalse(s0.has({ v: 4 }));
61
65
  });
62
66
 
63
67
  test('case 3', () => {
@@ -67,7 +71,7 @@ describe('ISetMapped.has', () => {
67
71
  fromKey,
68
72
  );
69
73
 
70
- expect(s0.has({ v: 3 })).toBe(false);
74
+ assert.isFalse(s0.has({ v: 3 }));
71
75
  });
72
76
  });
73
77
 
@@ -87,6 +91,7 @@ describe('ISetMapped.add', () => {
87
91
  fromKey,
88
92
  ),
89
93
  );
94
+
90
95
  assert.deepStrictEqual(
91
96
  s0,
92
97
  ISetMapped.create([{ v: 1 }, { v: 2 }, { v: 3 }], toKey, fromKey),
@@ -104,6 +109,7 @@ describe('ISetMapped.add', () => {
104
109
  s0.add({ v: 3 }),
105
110
  ISetMapped.create([{ v: 1 }, { v: 2 }, { v: 3 }], toKey, fromKey),
106
111
  );
112
+
107
113
  assert.deepStrictEqual(
108
114
  s0,
109
115
  ISetMapped.create([{ v: 1 }, { v: 2 }, { v: 3 }], toKey, fromKey),
@@ -117,6 +123,7 @@ describe('ISetMapped.add', () => {
117
123
  s0.add({ v: 1 }),
118
124
  ISetMapped.create([{ v: 1 }], toKey, fromKey),
119
125
  );
126
+
120
127
  assert.deepStrictEqual(s0, ISetMapped.create([], toKey, fromKey));
121
128
  });
122
129
  });
@@ -133,6 +140,7 @@ describe('ISetMapped.delete', () => {
133
140
  s0.delete({ v: 10 }),
134
141
  ISetMapped.create([{ v: 1 }, { v: 2 }, { v: 3 }], toKey, fromKey),
135
142
  );
143
+
136
144
  assert.deepStrictEqual(
137
145
  s0,
138
146
  ISetMapped.create([{ v: 1 }, { v: 2 }, { v: 3 }], toKey, fromKey),
@@ -150,6 +158,7 @@ describe('ISetMapped.delete', () => {
150
158
  s0.delete({ v: 3 }),
151
159
  ISetMapped.create([{ v: 1 }, { v: 2 }], toKey, fromKey),
152
160
  );
161
+
153
162
  assert.deepStrictEqual(
154
163
  s0,
155
164
  ISetMapped.create([{ v: 1 }, { v: 2 }, { v: 3 }], toKey, fromKey),
@@ -163,6 +172,7 @@ describe('ISetMapped.delete', () => {
163
172
  s0.delete({ v: 1 }),
164
173
  ISetMapped.create([], toKey, fromKey),
165
174
  );
175
+
166
176
  assert.deepStrictEqual(s0, ISetMapped.create([], toKey, fromKey));
167
177
  });
168
178
  });
@@ -174,6 +184,7 @@ describe('ISetMapped.forEach', () => {
174
184
  toKey,
175
185
  fromKey,
176
186
  );
187
+
177
188
  const elements = [{ v: 1 }, { v: 2 }, { v: 3 }];
178
189
 
179
190
  for (const el of s0) {
@@ -189,6 +200,7 @@ describe('ISetMapped.keys', () => {
189
200
  toKey,
190
201
  fromKey,
191
202
  );
203
+
192
204
  const elements = [{ v: 1 }, { v: 2 }, { v: 3 }];
193
205
 
194
206
  for (const k of s0.keys()) {
@@ -204,6 +216,7 @@ describe('ISetMapped.values', () => {
204
216
  toKey,
205
217
  fromKey,
206
218
  );
219
+
207
220
  const elements = [{ v: 1 }, { v: 2 }, { v: 3 }];
208
221
 
209
222
  for (const v of s0.values()) {
@@ -219,10 +232,12 @@ describe('ISetMapped.entries', () => {
219
232
  toKey,
220
233
  fromKey,
221
234
  );
235
+
222
236
  const elements = [{ v: 1 }, { v: 2 }, { v: 3 }];
223
237
 
224
238
  for (const [k, v] of s0.entries()) {
225
239
  expect(elements).toContainEqual(k);
240
+
226
241
  expect(elements).toContainEqual(v);
227
242
 
228
243
  assert.deepStrictEqual(k, v);
@@ -237,6 +252,7 @@ describe('ISetMapped.subtract', () => {
237
252
  toKey,
238
253
  fromKey,
239
254
  );
255
+
240
256
  const s1 = ISetMapped.create([{ v: 2 }, { v: 4 }], toKey, fromKey);
241
257
 
242
258
  assert.deepStrictEqual(
@@ -251,6 +267,7 @@ describe('ISetMapped.subtract', () => {
251
267
  toKey,
252
268
  fromKey,
253
269
  );
270
+
254
271
  const s1 = ISetMapped.create([], toKey, fromKey);
255
272
 
256
273
  assert.deepStrictEqual(
@@ -261,6 +278,7 @@ describe('ISetMapped.subtract', () => {
261
278
 
262
279
  test('case 3', () => {
263
280
  const s0 = ISetMapped.create([], toKey, fromKey);
281
+
264
282
  const s1 = ISetMapped.create(
265
283
  [{ v: 1 }, { v: 2 }, { v: 3 }],
266
284
  toKey,
@@ -281,6 +299,7 @@ describe('ISetMapped.diff', () => {
281
299
  toKey,
282
300
  fromKey,
283
301
  );
302
+
284
303
  const s1 = ISetMapped.create(
285
304
  [{ v: 2 }, { v: 3 }, { v: 4 }],
286
305
  toKey,
@@ -293,6 +312,7 @@ describe('ISetMapped.diff', () => {
293
312
  diff.deleted,
294
313
  ISetMapped.create([{ v: 1 }], toKey, fromKey),
295
314
  );
315
+
296
316
  assert.deepStrictEqual(
297
317
  diff.added,
298
318
  ISetMapped.create([{ v: 4 }], toKey, fromKey),
@@ -305,6 +325,7 @@ describe('ISetMapped.diff', () => {
305
325
  toKey,
306
326
  fromKey,
307
327
  );
328
+
308
329
  const s1 = ISetMapped.create([], toKey, fromKey);
309
330
 
310
331
  const diff = ISetMapped.diff(s0, s1);
@@ -313,11 +334,13 @@ describe('ISetMapped.diff', () => {
313
334
  diff.deleted,
314
335
  ISetMapped.create([{ v: 1 }, { v: 2 }, { v: 3 }], toKey, fromKey),
315
336
  );
337
+
316
338
  assert.deepStrictEqual(diff.added, ISetMapped.create([], toKey, fromKey));
317
339
  });
318
340
 
319
341
  test('case 3', () => {
320
342
  const s0 = ISetMapped.create([], toKey, fromKey);
343
+
321
344
  const s1 = ISetMapped.create(
322
345
  [{ v: 1 }, { v: 2 }, { v: 3 }],
323
346
  toKey,
@@ -327,6 +350,7 @@ describe('ISetMapped.diff', () => {
327
350
  const diff = ISetMapped.diff(s0, s1);
328
351
 
329
352
  assert.deepStrictEqual(diff.deleted, ISetMapped.create([], toKey, fromKey));
353
+
330
354
  assert.deepStrictEqual(
331
355
  diff.added,
332
356
  ISetMapped.create([{ v: 1 }, { v: 2 }, { v: 3 }], toKey, fromKey),
@@ -341,6 +365,7 @@ describe('ISetMapped.union', () => {
341
365
  toKey,
342
366
  fromKey,
343
367
  );
368
+
344
369
  const s1 = ISetMapped.create(
345
370
  [{ v: 3 }, { v: 4 }, { v: 5 }],
346
371
  toKey,
@@ -363,6 +388,7 @@ describe('ISetMapped.union', () => {
363
388
  toKey,
364
389
  fromKey,
365
390
  );
391
+
366
392
  const s1 = ISetMapped.create([], toKey, fromKey);
367
393
 
368
394
  assert.deepStrictEqual(
@@ -373,6 +399,7 @@ describe('ISetMapped.union', () => {
373
399
 
374
400
  test('case 3', () => {
375
401
  const s0 = ISetMapped.create([], toKey, fromKey);
402
+
376
403
  const s1 = ISetMapped.create(
377
404
  [{ v: 1 }, { v: 2 }, { v: 3 }],
378
405
  toKey,
@@ -393,6 +420,7 @@ describe('ISetMapped.intersection', () => {
393
420
  toKey,
394
421
  fromKey,
395
422
  );
423
+
396
424
  const s1 = ISetMapped.create(
397
425
  [{ v: 2 }, { v: 3 }, { v: 4 }],
398
426
  toKey,
@@ -411,6 +439,7 @@ describe('ISetMapped.intersection', () => {
411
439
  toKey,
412
440
  fromKey,
413
441
  );
442
+
414
443
  const s1 = ISetMapped.create([], toKey, fromKey);
415
444
 
416
445
  assert.deepStrictEqual(
@@ -421,6 +450,7 @@ describe('ISetMapped.intersection', () => {
421
450
 
422
451
  test('case 3', () => {
423
452
  const s0 = ISetMapped.create([], toKey, fromKey);
453
+
424
454
  const s1 = ISetMapped.create(
425
455
  [{ v: 1 }, { v: 2 }, { v: 3 }],
426
456
  toKey,
@@ -457,8 +487,10 @@ describe('ISetMapped additional functionality with complex types', () => {
457
487
  );
458
488
 
459
489
  expect(set.size).toBe(2);
460
- expect(set.has({ id: 1, type: 'user' })).toBe(true);
461
- expect(set.has({ id: 2, type: 'admin' })).toBe(true);
490
+
491
+ assert.isTrue(set.has({ id: 1, type: 'user' }));
492
+
493
+ assert.isTrue(set.has({ id: 2, type: 'admin' }));
462
494
  });
463
495
 
464
496
  test('should handle duplicate elements based on mapping', () => {
@@ -486,6 +518,7 @@ describe('ISetMapped additional functionality with complex types', () => {
486
518
  testElementToString,
487
519
  stringToTestElement,
488
520
  );
521
+
489
522
  const set2 = ISetMapped.create(
490
523
  [
491
524
  { id: 2, type: 'admin' },
@@ -495,7 +528,7 @@ describe('ISetMapped additional functionality with complex types', () => {
495
528
  stringToTestElement,
496
529
  );
497
530
 
498
- expect(ISetMapped.equal(set1, set2)).toBe(true);
531
+ assert.isTrue(ISetMapped.equal(set1, set2));
499
532
  });
500
533
 
501
534
  test('should return false for sets with different elements', () => {
@@ -507,6 +540,7 @@ describe('ISetMapped additional functionality with complex types', () => {
507
540
  testElementToString,
508
541
  stringToTestElement,
509
542
  );
543
+
510
544
  const set2 = ISetMapped.create(
511
545
  [
512
546
  { id: 1, type: 'user' },
@@ -516,7 +550,7 @@ describe('ISetMapped additional functionality with complex types', () => {
516
550
  stringToTestElement,
517
551
  );
518
552
 
519
- expect(ISetMapped.equal(set1, set2)).toBe(false);
553
+ assert.isFalse(ISetMapped.equal(set1, set2));
520
554
  });
521
555
 
522
556
  test('should return true for empty sets', () => {
@@ -525,13 +559,14 @@ describe('ISetMapped additional functionality with complex types', () => {
525
559
  testElementToString,
526
560
  stringToTestElement,
527
561
  );
562
+
528
563
  const set2 = ISetMapped.create<TestElement, string>(
529
564
  [],
530
565
  testElementToString,
531
566
  stringToTestElement,
532
567
  );
533
568
 
534
- expect(ISetMapped.equal(set1, set2)).toBe(true);
569
+ assert.isTrue(ISetMapped.equal(set1, set2));
535
570
  });
536
571
  });
537
572
 
@@ -546,6 +581,7 @@ describe('ISetMapped additional functionality with complex types', () => {
546
581
  testElementToString,
547
582
  stringToTestElement,
548
583
  );
584
+
549
585
  const newSet = ISetMapped.create(
550
586
  [
551
587
  { id: 2, type: 'admin' },
@@ -559,10 +595,12 @@ describe('ISetMapped additional functionality with complex types', () => {
559
595
  const diff = ISetMapped.diff(oldSet, newSet);
560
596
 
561
597
  expect(diff.deleted.size).toBe(1);
562
- expect(diff.deleted.has({ id: 1, type: 'user' })).toBe(true);
598
+
599
+ assert.isTrue(diff.deleted.has({ id: 1, type: 'user' }));
563
600
 
564
601
  expect(diff.added.size).toBe(1);
565
- expect(diff.added.has({ id: 4, type: 'user' })).toBe(true);
602
+
603
+ assert.isTrue(diff.added.has({ id: 4, type: 'user' }));
566
604
  });
567
605
 
568
606
  test('should handle no changes', () => {
@@ -574,6 +612,7 @@ describe('ISetMapped additional functionality with complex types', () => {
574
612
  testElementToString,
575
613
  stringToTestElement,
576
614
  );
615
+
577
616
  const set2 = ISetMapped.create(
578
617
  [
579
618
  { id: 1, type: 'user' },
@@ -586,6 +625,7 @@ describe('ISetMapped additional functionality with complex types', () => {
586
625
  const diff = ISetMapped.diff(set1, set2);
587
626
 
588
627
  expect(diff.deleted.size).toBe(0);
628
+
589
629
  expect(diff.added.size).toBe(0);
590
630
  });
591
631
  });
@@ -601,6 +641,7 @@ describe('ISetMapped additional functionality with complex types', () => {
601
641
  testElementToString,
602
642
  stringToTestElement,
603
643
  );
644
+
604
645
  const set2 = ISetMapped.create(
605
646
  [
606
647
  { id: 2, type: 'admin' },
@@ -614,8 +655,10 @@ describe('ISetMapped additional functionality with complex types', () => {
614
655
  const intersection = ISetMapped.intersection(set1, set2);
615
656
 
616
657
  expect(intersection.size).toBe(2);
617
- expect(intersection.has({ id: 2, type: 'admin' })).toBe(true);
618
- expect(intersection.has({ id: 3, type: 'guest' })).toBe(true);
658
+
659
+ assert.isTrue(intersection.has({ id: 2, type: 'admin' }));
660
+
661
+ assert.isTrue(intersection.has({ id: 3, type: 'guest' }));
619
662
  });
620
663
 
621
664
  test('should compute union correctly', () => {
@@ -627,6 +670,7 @@ describe('ISetMapped additional functionality with complex types', () => {
627
670
  testElementToString,
628
671
  stringToTestElement,
629
672
  );
673
+
630
674
  const set2 = ISetMapped.create(
631
675
  [
632
676
  { id: 3, type: 'guest' },
@@ -639,10 +683,14 @@ describe('ISetMapped additional functionality with complex types', () => {
639
683
  const union = ISetMapped.union(set1, set2);
640
684
 
641
685
  expect(union.size).toBe(4);
642
- expect(union.has({ id: 1, type: 'user' })).toBe(true);
643
- expect(union.has({ id: 2, type: 'admin' })).toBe(true);
644
- expect(union.has({ id: 3, type: 'guest' })).toBe(true);
645
- expect(union.has({ id: 4, type: 'user' })).toBe(true);
686
+
687
+ assert.isTrue(union.has({ id: 1, type: 'user' }));
688
+
689
+ assert.isTrue(union.has({ id: 2, type: 'admin' }));
690
+
691
+ assert.isTrue(union.has({ id: 3, type: 'guest' }));
692
+
693
+ assert.isTrue(union.has({ id: 4, type: 'user' }));
646
694
  });
647
695
  });
648
696
 
@@ -657,7 +705,7 @@ describe('ISetMapped additional functionality with complex types', () => {
657
705
  stringToTestElement,
658
706
  );
659
707
 
660
- expect(set.every((el) => el.type === 'user')).toBe(true);
708
+ assert.isTrue(set.every((el) => el.type === 'user'));
661
709
  });
662
710
 
663
711
  test('should return false when some elements do not satisfy predicate', () => {
@@ -670,7 +718,7 @@ describe('ISetMapped additional functionality with complex types', () => {
670
718
  stringToTestElement,
671
719
  );
672
720
 
673
- expect(set.every((el) => el.type === 'user')).toBe(false);
721
+ assert.isFalse(set.every((el) => el.type === 'user'));
674
722
  });
675
723
  });
676
724
 
@@ -685,7 +733,7 @@ describe('ISetMapped additional functionality with complex types', () => {
685
733
  stringToTestElement,
686
734
  );
687
735
 
688
- expect(set.some((el) => el.type === 'admin')).toBe(true);
736
+ assert.isTrue(set.some((el) => el.type === 'admin'));
689
737
  });
690
738
 
691
739
  test('should return false when no elements satisfy predicate', () => {
@@ -698,7 +746,7 @@ describe('ISetMapped additional functionality with complex types', () => {
698
746
  stringToTestElement,
699
747
  );
700
748
 
701
- expect(set.some((el) => el.type === 'admin')).toBe(false);
749
+ assert.isFalse(set.some((el) => el.type === 'admin'));
702
750
  });
703
751
  });
704
752
 
@@ -709,11 +757,14 @@ describe('ISetMapped additional functionality with complex types', () => {
709
757
  testElementToString,
710
758
  stringToTestElement,
711
759
  );
760
+
712
761
  const updated = set.add({ id: 2, type: 'admin' });
713
762
 
714
763
  expect(updated.size).toBe(2);
715
- expect(updated.has({ id: 1, type: 'user' })).toBe(true);
716
- expect(updated.has({ id: 2, type: 'admin' })).toBe(true);
764
+
765
+ assert.isTrue(updated.has({ id: 1, type: 'user' }));
766
+
767
+ assert.isTrue(updated.has({ id: 2, type: 'admin' }));
717
768
  });
718
769
 
719
770
  test('should return same instance when adding existing element', () => {
@@ -722,6 +773,7 @@ describe('ISetMapped additional functionality with complex types', () => {
722
773
  testElementToString,
723
774
  stringToTestElement,
724
775
  );
776
+
725
777
  const updated = set.add({ id: 1, type: 'user' });
726
778
 
727
779
  expect(updated).toBe(set);
@@ -738,11 +790,14 @@ describe('ISetMapped additional functionality with complex types', () => {
738
790
  testElementToString,
739
791
  stringToTestElement,
740
792
  );
793
+
741
794
  const updated = set.delete({ id: 1, type: 'user' });
742
795
 
743
796
  expect(updated.size).toBe(1);
744
- expect(updated.has({ id: 1, type: 'user' })).toBe(false);
745
- expect(updated.has({ id: 2, type: 'admin' })).toBe(true);
797
+
798
+ assert.isFalse(updated.has({ id: 1, type: 'user' }));
799
+
800
+ assert.isTrue(updated.has({ id: 2, type: 'admin' }));
746
801
  });
747
802
 
748
803
  test('should return same instance when deleting non-existent element', () => {
@@ -751,6 +806,7 @@ describe('ISetMapped additional functionality with complex types', () => {
751
806
  testElementToString,
752
807
  stringToTestElement,
753
808
  );
809
+
754
810
  const updated = set.delete({ id: 2, type: 'admin' });
755
811
 
756
812
  expect(updated).toBe(set);
@@ -772,9 +828,12 @@ describe('ISetMapped additional functionality with complex types', () => {
772
828
  ]);
773
829
 
774
830
  expect(updated.size).toBe(2);
775
- expect(updated.has({ id: 1, type: 'user' })).toBe(false);
776
- expect(updated.has({ id: 2, type: 'admin' })).toBe(true);
777
- expect(updated.has({ id: 3, type: 'guest' })).toBe(true);
831
+
832
+ assert.isFalse(updated.has({ id: 1, type: 'user' }));
833
+
834
+ assert.isTrue(updated.has({ id: 2, type: 'admin' }));
835
+
836
+ assert.isTrue(updated.has({ id: 3, type: 'guest' }));
778
837
  });
779
838
 
780
839
  test('should handle empty mutations array', () => {
@@ -783,10 +842,12 @@ describe('ISetMapped additional functionality with complex types', () => {
783
842
  testElementToString,
784
843
  stringToTestElement,
785
844
  );
845
+
786
846
  const updated = set.withMutations([]);
787
847
 
788
848
  expect(updated.size).toBe(1);
789
- expect(ISetMapped.equal(set, updated)).toBe(true);
849
+
850
+ assert.isTrue(ISetMapped.equal(set, updated));
790
851
  });
791
852
  });
792
853
 
@@ -800,14 +861,17 @@ describe('ISetMapped additional functionality with complex types', () => {
800
861
  testElementToString,
801
862
  stringToTestElement,
802
863
  );
864
+
803
865
  const transformed = set.map((el) => ({
804
866
  ...el,
805
867
  type: el.type.toUpperCase(),
806
868
  }));
807
869
 
808
870
  expect(transformed.size).toBe(2);
809
- expect(transformed.has({ id: 1, type: 'USER' })).toBe(true);
810
- expect(transformed.has({ id: 2, type: 'ADMIN' })).toBe(true);
871
+
872
+ assert.isTrue(transformed.has({ id: 1, type: 'USER' }));
873
+
874
+ assert.isTrue(transformed.has({ id: 2, type: 'ADMIN' }));
811
875
  });
812
876
  });
813
877
 
@@ -822,12 +886,16 @@ describe('ISetMapped additional functionality with complex types', () => {
822
886
  testElementToString,
823
887
  stringToTestElement,
824
888
  );
889
+
825
890
  const filtered = set.filter((el) => el.type === 'user');
826
891
 
827
892
  expect(filtered.size).toBe(2);
828
- expect(filtered.has({ id: 1, type: 'user' })).toBe(true);
829
- expect(filtered.has({ id: 3, type: 'user' })).toBe(true);
830
- expect(filtered.has({ id: 2, type: 'admin' })).toBe(false);
893
+
894
+ assert.isTrue(filtered.has({ id: 1, type: 'user' }));
895
+
896
+ assert.isTrue(filtered.has({ id: 3, type: 'user' }));
897
+
898
+ assert.isFalse(filtered.has({ id: 2, type: 'admin' }));
831
899
  });
832
900
  });
833
901
 
@@ -842,12 +910,16 @@ describe('ISetMapped additional functionality with complex types', () => {
842
910
  testElementToString,
843
911
  stringToTestElement,
844
912
  );
913
+
845
914
  const filtered = set.filterNot((el) => el.type === 'user');
846
915
 
847
916
  expect(filtered.size).toBe(1);
848
- expect(filtered.has({ id: 2, type: 'admin' })).toBe(true);
849
- expect(filtered.has({ id: 1, type: 'user' })).toBe(false);
850
- expect(filtered.has({ id: 3, type: 'user' })).toBe(false);
917
+
918
+ assert.isTrue(filtered.has({ id: 2, type: 'admin' }));
919
+
920
+ assert.isFalse(filtered.has({ id: 1, type: 'user' }));
921
+
922
+ assert.isFalse(filtered.has({ id: 3, type: 'user' }));
851
923
  });
852
924
  });
853
925
 
@@ -861,6 +933,7 @@ describe('ISetMapped additional functionality with complex types', () => {
861
933
  testElementToString,
862
934
  stringToTestElement,
863
935
  );
936
+
864
937
  const mut_collected: TestElement[] = [];
865
938
 
866
939
  for (const el of set) {
@@ -868,7 +941,9 @@ describe('ISetMapped additional functionality with complex types', () => {
868
941
  }
869
942
 
870
943
  expect(mut_collected).toHaveLength(2);
944
+
871
945
  expect(mut_collected).toContainEqual({ id: 1, type: 'user' });
946
+
872
947
  expect(mut_collected).toContainEqual({ id: 2, type: 'admin' });
873
948
  });
874
949
  });
@@ -880,6 +955,7 @@ describe('ISetMapped additional functionality with complex types', () => {
880
955
  testElementToString,
881
956
  stringToTestElement,
882
957
  );
958
+
883
959
  const superset = ISetMapped.create(
884
960
  [
885
961
  { id: 1, type: 'user' },
@@ -889,7 +965,7 @@ describe('ISetMapped additional functionality with complex types', () => {
889
965
  stringToTestElement,
890
966
  );
891
967
 
892
- expect(subset.isSubsetOf(superset)).toBe(true);
968
+ assert.isTrue(subset.isSubsetOf(superset));
893
969
  });
894
970
 
895
971
  test('should return false for non-subset', () => {
@@ -901,6 +977,7 @@ describe('ISetMapped additional functionality with complex types', () => {
901
977
  testElementToString,
902
978
  stringToTestElement,
903
979
  );
980
+
904
981
  const set2 = ISetMapped.create(
905
982
  [
906
983
  { id: 1, type: 'user' },
@@ -910,7 +987,7 @@ describe('ISetMapped additional functionality with complex types', () => {
910
987
  stringToTestElement,
911
988
  );
912
989
 
913
- expect(set1.isSubsetOf(set2)).toBe(false);
990
+ assert.isFalse(set1.isSubsetOf(set2));
914
991
  });
915
992
  });
916
993
 
@@ -924,13 +1001,14 @@ describe('ISetMapped additional functionality with complex types', () => {
924
1001
  testElementToString,
925
1002
  stringToTestElement,
926
1003
  );
1004
+
927
1005
  const subset = ISetMapped.create(
928
1006
  [{ id: 1, type: 'user' }],
929
1007
  testElementToString,
930
1008
  stringToTestElement,
931
1009
  );
932
1010
 
933
- expect(superset.isSupersetOf(subset)).toBe(true);
1011
+ assert.isTrue(superset.isSupersetOf(subset));
934
1012
  });
935
1013
 
936
1014
  test('should return false for non-superset', () => {
@@ -942,6 +1020,7 @@ describe('ISetMapped additional functionality with complex types', () => {
942
1020
  testElementToString,
943
1021
  stringToTestElement,
944
1022
  );
1023
+
945
1024
  const set2 = ISetMapped.create(
946
1025
  [
947
1026
  { id: 1, type: 'user' },
@@ -951,7 +1030,7 @@ describe('ISetMapped additional functionality with complex types', () => {
951
1030
  stringToTestElement,
952
1031
  );
953
1032
 
954
- expect(set1.isSupersetOf(set2)).toBe(false);
1033
+ assert.isFalse(set1.isSupersetOf(set2));
955
1034
  });
956
1035
  });
957
1036
 
@@ -966,6 +1045,7 @@ describe('ISetMapped additional functionality with complex types', () => {
966
1045
  testElementToString,
967
1046
  stringToTestElement,
968
1047
  );
1048
+
969
1049
  const set2 = ISetMapped.create(
970
1050
  [
971
1051
  { id: 2, type: 'admin' },
@@ -974,12 +1054,16 @@ describe('ISetMapped additional functionality with complex types', () => {
974
1054
  testElementToString,
975
1055
  stringToTestElement,
976
1056
  );
1057
+
977
1058
  const result = set1.subtract(set2);
978
1059
 
979
1060
  expect(result.size).toBe(2);
980
- expect(result.has({ id: 1, type: 'user' })).toBe(true);
981
- expect(result.has({ id: 3, type: 'guest' })).toBe(true);
982
- expect(result.has({ id: 2, type: 'admin' })).toBe(false);
1061
+
1062
+ assert.isTrue(result.has({ id: 1, type: 'user' }));
1063
+
1064
+ assert.isTrue(result.has({ id: 3, type: 'guest' }));
1065
+
1066
+ assert.isFalse(result.has({ id: 2, type: 'admin' }));
983
1067
  });
984
1068
  });
985
1069
 
@@ -994,6 +1078,7 @@ describe('ISetMapped additional functionality with complex types', () => {
994
1078
  testElementToString,
995
1079
  stringToTestElement,
996
1080
  );
1081
+
997
1082
  const set2 = ISetMapped.create(
998
1083
  [
999
1084
  { id: 2, type: 'admin' },
@@ -1003,12 +1088,16 @@ describe('ISetMapped additional functionality with complex types', () => {
1003
1088
  testElementToString,
1004
1089
  stringToTestElement,
1005
1090
  );
1091
+
1006
1092
  const result = set1.intersect(set2);
1007
1093
 
1008
1094
  expect(result.size).toBe(2);
1009
- expect(result.has({ id: 2, type: 'admin' })).toBe(true);
1010
- expect(result.has({ id: 3, type: 'guest' })).toBe(true);
1011
- expect(result.has({ id: 1, type: 'user' })).toBe(false);
1095
+
1096
+ assert.isTrue(result.has({ id: 2, type: 'admin' }));
1097
+
1098
+ assert.isTrue(result.has({ id: 3, type: 'guest' }));
1099
+
1100
+ assert.isFalse(result.has({ id: 1, type: 'user' }));
1012
1101
  });
1013
1102
  });
1014
1103
 
@@ -1022,6 +1111,7 @@ describe('ISetMapped additional functionality with complex types', () => {
1022
1111
  testElementToString,
1023
1112
  stringToTestElement,
1024
1113
  );
1114
+
1025
1115
  const set2 = ISetMapped.create(
1026
1116
  [
1027
1117
  { id: 3, type: 'guest' },
@@ -1030,13 +1120,18 @@ describe('ISetMapped additional functionality with complex types', () => {
1030
1120
  testElementToString,
1031
1121
  stringToTestElement,
1032
1122
  );
1123
+
1033
1124
  const result = set1.union(set2);
1034
1125
 
1035
1126
  expect(result.size).toBe(4);
1036
- expect(result.has({ id: 1, type: 'user' })).toBe(true);
1037
- expect(result.has({ id: 2, type: 'admin' })).toBe(true);
1038
- expect(result.has({ id: 3, type: 'guest' })).toBe(true);
1039
- expect(result.has({ id: 4, type: 'user' })).toBe(true);
1127
+
1128
+ assert.isTrue(result.has({ id: 1, type: 'user' }));
1129
+
1130
+ assert.isTrue(result.has({ id: 2, type: 'admin' }));
1131
+
1132
+ assert.isTrue(result.has({ id: 3, type: 'guest' }));
1133
+
1134
+ assert.isTrue(result.has({ id: 4, type: 'user' }));
1040
1135
  });
1041
1136
  });
1042
1137
 
@@ -1050,10 +1145,13 @@ describe('ISetMapped additional functionality with complex types', () => {
1050
1145
  testElementToString,
1051
1146
  stringToTestElement,
1052
1147
  );
1148
+
1053
1149
  const keys = Array.from(set.keys());
1054
1150
 
1055
1151
  expect(keys).toHaveLength(2);
1152
+
1056
1153
  expect(keys).toContainEqual({ id: 1, type: 'user' });
1154
+
1057
1155
  expect(keys).toContainEqual({ id: 2, type: 'admin' });
1058
1156
  });
1059
1157
 
@@ -1066,10 +1164,13 @@ describe('ISetMapped additional functionality with complex types', () => {
1066
1164
  testElementToString,
1067
1165
  stringToTestElement,
1068
1166
  );
1167
+
1069
1168
  const values = Array.from(set.values());
1070
1169
 
1071
1170
  expect(values).toHaveLength(2);
1171
+
1072
1172
  expect(values).toContainEqual({ id: 1, type: 'user' });
1173
+
1073
1174
  expect(values).toContainEqual({ id: 2, type: 'admin' });
1074
1175
  });
1075
1176
 
@@ -1082,6 +1183,7 @@ describe('ISetMapped additional functionality with complex types', () => {
1082
1183
  testElementToString,
1083
1184
  stringToTestElement,
1084
1185
  );
1186
+
1085
1187
  const entries = Array.from(set.entries());
1086
1188
 
1087
1189
  expect(entries).toHaveLength(2);
@@ -1100,6 +1202,7 @@ describe('ISetMapped additional functionality with complex types', () => {
1100
1202
  testElementToString,
1101
1203
  stringToTestElement,
1102
1204
  );
1205
+
1103
1206
  const mut_collected: TestElement[] = [];
1104
1207
 
1105
1208
  for (const element of set) {
@@ -1107,7 +1210,9 @@ describe('ISetMapped additional functionality with complex types', () => {
1107
1210
  }
1108
1211
 
1109
1212
  expect(mut_collected).toHaveLength(2);
1213
+
1110
1214
  expect(mut_collected).toContainEqual({ id: 1, type: 'user' });
1215
+
1111
1216
  expect(mut_collected).toContainEqual({ id: 2, type: 'admin' });
1112
1217
  });
1113
1218
  });
@@ -1122,10 +1227,13 @@ describe('ISetMapped additional functionality with complex types', () => {
1122
1227
  testElementToString,
1123
1228
  stringToTestElement,
1124
1229
  );
1230
+
1125
1231
  const array = set.toArray();
1126
1232
 
1127
1233
  expect(array).toHaveLength(2);
1234
+
1128
1235
  expect(array).toContainEqual({ id: 1, type: 'user' });
1236
+
1129
1237
  expect(array).toContainEqual({ id: 2, type: 'admin' });
1130
1238
  });
1131
1239
 
@@ -1138,11 +1246,14 @@ describe('ISetMapped additional functionality with complex types', () => {
1138
1246
  testElementToString,
1139
1247
  stringToTestElement,
1140
1248
  );
1249
+
1141
1250
  const rawSet = set.toRawSet();
1142
1251
 
1143
1252
  expect(rawSet.size).toBe(2);
1144
- expect(rawSet.has('user_1')).toBe(true);
1145
- expect(rawSet.has('admin_2')).toBe(true);
1253
+
1254
+ assert.isTrue(rawSet.has('user_1'));
1255
+
1256
+ assert.isTrue(rawSet.has('admin_2'));
1146
1257
  });
1147
1258
  });
1148
1259
  });