@daiso-tech/core 0.1.1 → 0.1.3

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 (710) hide show
  1. package/README.md +29 -0
  2. package/dist/cjs/{types.js.map → _shared/types.js.map} +1 -1
  3. package/dist/cjs/collection/_shared.js.map +1 -1
  4. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/_module.js +35 -35
  5. package/dist/cjs/collection/async-iterable-collection/_shared/_module.js.map +1 -0
  6. package/dist/cjs/collection/async-iterable-collection/_shared/async-abort-iterable.js.map +1 -0
  7. package/dist/cjs/collection/async-iterable-collection/_shared/async-chunk-iterable.js.map +1 -0
  8. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-chunk-whilte-iterable.js +4 -4
  9. package/dist/cjs/collection/async-iterable-collection/_shared/async-chunk-whilte-iterable.js.map +1 -0
  10. package/dist/cjs/collection/async-iterable-collection/_shared/async-collapse-iterable.js.map +1 -0
  11. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-count-by-iterable.js +4 -4
  12. package/dist/cjs/collection/async-iterable-collection/_shared/async-count-by-iterable.js.map +1 -0
  13. package/dist/cjs/collection/async-iterable-collection/_shared/async-cross-join-iterable.js.map +1 -0
  14. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-delay-iterable.js +7 -1
  15. package/dist/cjs/collection/async-iterable-collection/_shared/async-delay-iterable.js.map +1 -0
  16. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-entries-iterable.js +5 -4
  17. package/dist/cjs/collection/async-iterable-collection/_shared/async-entries-iterable.js.map +1 -0
  18. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-filter-iterable.js +4 -4
  19. package/dist/cjs/collection/async-iterable-collection/_shared/async-filter-iterable.js.map +1 -0
  20. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-flat-map-iterable.js +7 -7
  21. package/dist/cjs/collection/async-iterable-collection/_shared/async-flat-map-iterable.js.map +1 -0
  22. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-group-by-iterable.js +4 -4
  23. package/dist/cjs/collection/async-iterable-collection/_shared/async-group-by-iterable.js.map +1 -0
  24. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-insert-after-iterable.js +4 -4
  25. package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-after-iterable.js.map +1 -0
  26. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-insert-before-iterable.js +4 -4
  27. package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-before-iterable.js.map +1 -0
  28. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-map-iterable.js +7 -7
  29. package/dist/cjs/collection/async-iterable-collection/_shared/async-map-iterable.js.map +1 -0
  30. package/dist/cjs/collection/async-iterable-collection/_shared/async-merge-iterable.js.map +1 -0
  31. package/dist/cjs/collection/async-iterable-collection/_shared/async-pad-end-iterable.js.map +1 -0
  32. package/dist/cjs/collection/async-iterable-collection/_shared/async-pad-start-iterable.js.map +1 -0
  33. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-partion-iterable.js +4 -4
  34. package/dist/cjs/collection/async-iterable-collection/_shared/async-partion-iterable.js.map +1 -0
  35. package/dist/cjs/collection/async-iterable-collection/_shared/async-repeat-iterable.js.map +1 -0
  36. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-reverse-iterable.js +5 -5
  37. package/dist/cjs/collection/async-iterable-collection/_shared/async-reverse-iterable.js.map +1 -0
  38. package/dist/cjs/collection/async-iterable-collection/_shared/async-shuffle-iterable.js.map +1 -0
  39. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-skip-iterable.js +5 -5
  40. package/dist/cjs/collection/async-iterable-collection/_shared/async-skip-iterable.js.map +1 -0
  41. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-skip-until-iterable.js +4 -4
  42. package/dist/cjs/collection/async-iterable-collection/_shared/async-skip-until-iterable.js.map +1 -0
  43. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-slice-iterable.js +4 -4
  44. package/dist/cjs/collection/async-iterable-collection/_shared/async-slice-iterable.js.map +1 -0
  45. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-sliding-iterable.js +5 -5
  46. package/dist/cjs/collection/async-iterable-collection/_shared/async-sliding-iterable.js.map +1 -0
  47. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-sort-iterable.js +4 -4
  48. package/dist/cjs/collection/async-iterable-collection/_shared/async-sort-iterable.js.map +1 -0
  49. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-split-iterable.js +5 -5
  50. package/dist/cjs/collection/async-iterable-collection/_shared/async-split-iterable.js.map +1 -0
  51. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-take-iterable.js +5 -5
  52. package/dist/cjs/collection/async-iterable-collection/_shared/async-take-iterable.js.map +1 -0
  53. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-take-until-iterable.js +4 -4
  54. package/dist/cjs/collection/async-iterable-collection/_shared/async-take-until-iterable.js.map +1 -0
  55. package/dist/cjs/collection/async-iterable-collection/_shared/async-tap-iterable.js.map +1 -0
  56. package/dist/cjs/collection/async-iterable-collection/_shared/async-timeout-iterable.js.map +1 -0
  57. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-unique-iterable.js +3 -3
  58. package/dist/cjs/collection/async-iterable-collection/_shared/async-unique-iterable.js.map +1 -0
  59. package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-update-iterable.js +7 -7
  60. package/dist/cjs/collection/async-iterable-collection/_shared/async-update-iterable.js.map +1 -0
  61. package/dist/cjs/collection/async-iterable-collection/_shared/async-when-iterable.js.map +1 -0
  62. package/dist/cjs/collection/async-iterable-collection/_shared/async-zip-iterable.js.map +1 -0
  63. package/dist/cjs/collection/async-iterable-collection/async-iterable-collection.js +124 -112
  64. package/dist/cjs/collection/async-iterable-collection/async-iterable-collection.js.map +1 -1
  65. package/dist/cjs/collection/iterable-collection/_shared/_module.js +49 -0
  66. package/dist/cjs/collection/iterable-collection/_shared/_module.js.map +1 -0
  67. package/dist/cjs/collection/iterable-collection/_shared/chunk-iterable.js.map +1 -0
  68. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/chunk-whilte-iterable.js +7 -7
  69. package/dist/cjs/collection/iterable-collection/_shared/chunk-whilte-iterable.js.map +1 -0
  70. package/dist/cjs/collection/iterable-collection/_shared/collapse-iterable.js.map +1 -0
  71. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/count-by-iterable.js +7 -7
  72. package/dist/cjs/collection/iterable-collection/_shared/count-by-iterable.js.map +1 -0
  73. package/dist/cjs/collection/iterable-collection/_shared/cross-join-iterable.js.map +1 -0
  74. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/entries-iterable.js +4 -4
  75. package/dist/cjs/collection/iterable-collection/_shared/entries-iterable.js.map +1 -0
  76. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/filter-iterable.js +7 -7
  77. package/dist/cjs/collection/iterable-collection/_shared/filter-iterable.js.map +1 -0
  78. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/flat-map-iterable.js +7 -7
  79. package/dist/cjs/collection/iterable-collection/_shared/flat-map-iterable.js.map +1 -0
  80. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/group-by-iterable.js +7 -7
  81. package/dist/cjs/collection/iterable-collection/_shared/group-by-iterable.js.map +1 -0
  82. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/insert-after-iterable.js +8 -7
  83. package/dist/cjs/collection/iterable-collection/_shared/insert-after-iterable.js.map +1 -0
  84. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/insert-before-iterable.js +8 -7
  85. package/dist/cjs/collection/iterable-collection/_shared/insert-before-iterable.js.map +1 -0
  86. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/map-iterable.js +7 -7
  87. package/dist/cjs/collection/iterable-collection/_shared/map-iterable.js.map +1 -0
  88. package/dist/cjs/collection/iterable-collection/_shared/merge-iterable.js.map +1 -0
  89. package/dist/cjs/collection/iterable-collection/_shared/pad-end-iterable.js.map +1 -0
  90. package/dist/cjs/collection/iterable-collection/_shared/pad-start-iterable.js.map +1 -0
  91. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/partion-iterable.js +7 -7
  92. package/dist/cjs/collection/iterable-collection/_shared/partion-iterable.js.map +1 -0
  93. package/dist/cjs/collection/iterable-collection/_shared/repeat-iterable.js.map +1 -0
  94. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/reverse-iterable.js +5 -5
  95. package/dist/cjs/collection/iterable-collection/_shared/reverse-iterable.js.map +1 -0
  96. package/dist/cjs/collection/iterable-collection/_shared/shuffle-iterable.js.map +1 -0
  97. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/skip-iterable.js +6 -5
  98. package/dist/cjs/collection/iterable-collection/_shared/skip-iterable.js.map +1 -0
  99. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/skip-until-iterable.js +7 -7
  100. package/dist/cjs/collection/iterable-collection/_shared/skip-until-iterable.js.map +1 -0
  101. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/slice-iterable.js +4 -4
  102. package/dist/cjs/collection/iterable-collection/_shared/slice-iterable.js.map +1 -0
  103. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/sliding-iterable.js +5 -5
  104. package/dist/cjs/collection/iterable-collection/_shared/sliding-iterable.js.map +1 -0
  105. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/sort-iterable.js +4 -4
  106. package/dist/cjs/collection/iterable-collection/_shared/sort-iterable.js.map +1 -0
  107. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/split-iterable.js +5 -5
  108. package/dist/cjs/collection/iterable-collection/_shared/split-iterable.js.map +1 -0
  109. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/take-iterable.js +6 -5
  110. package/dist/cjs/collection/iterable-collection/_shared/take-iterable.js.map +1 -0
  111. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/take-until-iterable.js +7 -7
  112. package/dist/cjs/collection/iterable-collection/_shared/take-until-iterable.js.map +1 -0
  113. package/dist/cjs/collection/iterable-collection/_shared/tap-iterable.js.map +1 -0
  114. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/unique-iterable.js +4 -4
  115. package/dist/cjs/collection/iterable-collection/_shared/unique-iterable.js.map +1 -0
  116. package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/update-iterable.js +10 -10
  117. package/dist/cjs/collection/iterable-collection/_shared/update-iterable.js.map +1 -0
  118. package/dist/cjs/collection/iterable-collection/_shared/when-iterable.js.map +1 -0
  119. package/dist/cjs/collection/iterable-collection/_shared/zip-iterable.js.map +1 -0
  120. package/dist/cjs/collection/iterable-collection/iterable-collection.js +140 -123
  121. package/dist/cjs/collection/iterable-collection/iterable-collection.js.map +1 -1
  122. package/dist/cjs/collection/list-collection/list-collection.js +108 -76
  123. package/dist/cjs/collection/list-collection/list-collection.js.map +1 -1
  124. package/dist/cjs/contracts/_module.js +1 -1
  125. package/dist/cjs/contracts/_module.js.map +1 -1
  126. package/dist/cjs/contracts/collection/_module.js.map +1 -1
  127. package/dist/cjs/contracts/collection/_shared.js +1 -1
  128. package/dist/cjs/contracts/collection/_shared.js.map +1 -1
  129. package/dist/esm/{types.js.map → _shared/types.js.map} +1 -1
  130. package/dist/esm/collection/_shared.js.map +1 -1
  131. package/dist/esm/collection/async-iterable-collection/_shared/_module.js +36 -0
  132. package/dist/esm/collection/async-iterable-collection/_shared/_module.js.map +1 -0
  133. package/dist/esm/collection/async-iterable-collection/_shared/async-abort-iterable.js.map +1 -0
  134. package/dist/esm/collection/async-iterable-collection/_shared/async-chunk-iterable.js.map +1 -0
  135. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-chunk-whilte-iterable.js +4 -4
  136. package/dist/esm/collection/async-iterable-collection/_shared/async-chunk-whilte-iterable.js.map +1 -0
  137. package/dist/esm/collection/async-iterable-collection/_shared/async-collapse-iterable.js.map +1 -0
  138. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-count-by-iterable.js +4 -4
  139. package/dist/esm/collection/async-iterable-collection/_shared/async-count-by-iterable.js.map +1 -0
  140. package/dist/esm/collection/async-iterable-collection/_shared/async-cross-join-iterable.js.map +1 -0
  141. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-delay-iterable.js +7 -1
  142. package/dist/esm/collection/async-iterable-collection/_shared/async-delay-iterable.js.map +1 -0
  143. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-entries-iterable.js +5 -4
  144. package/dist/esm/collection/async-iterable-collection/_shared/async-entries-iterable.js.map +1 -0
  145. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-filter-iterable.js +4 -4
  146. package/dist/esm/collection/async-iterable-collection/_shared/async-filter-iterable.js.map +1 -0
  147. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-flat-map-iterable.js +7 -7
  148. package/dist/esm/collection/async-iterable-collection/_shared/async-flat-map-iterable.js.map +1 -0
  149. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-group-by-iterable.js +4 -4
  150. package/dist/esm/collection/async-iterable-collection/_shared/async-group-by-iterable.js.map +1 -0
  151. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-insert-after-iterable.js +4 -4
  152. package/dist/esm/collection/async-iterable-collection/_shared/async-insert-after-iterable.js.map +1 -0
  153. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-insert-before-iterable.js +4 -4
  154. package/dist/esm/collection/async-iterable-collection/_shared/async-insert-before-iterable.js.map +1 -0
  155. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-map-iterable.js +7 -7
  156. package/dist/esm/collection/async-iterable-collection/_shared/async-map-iterable.js.map +1 -0
  157. package/dist/esm/collection/async-iterable-collection/_shared/async-merge-iterable.js.map +1 -0
  158. package/dist/esm/collection/async-iterable-collection/_shared/async-pad-end-iterable.js.map +1 -0
  159. package/dist/esm/collection/async-iterable-collection/_shared/async-pad-start-iterable.js.map +1 -0
  160. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-partion-iterable.js +4 -4
  161. package/dist/esm/collection/async-iterable-collection/_shared/async-partion-iterable.js.map +1 -0
  162. package/dist/esm/collection/async-iterable-collection/_shared/async-repeat-iterable.js.map +1 -0
  163. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-reverse-iterable.js +5 -5
  164. package/dist/esm/collection/async-iterable-collection/_shared/async-reverse-iterable.js.map +1 -0
  165. package/dist/esm/collection/async-iterable-collection/_shared/async-shuffle-iterable.js.map +1 -0
  166. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-skip-iterable.js +5 -5
  167. package/dist/esm/collection/async-iterable-collection/_shared/async-skip-iterable.js.map +1 -0
  168. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-skip-until-iterable.js +4 -4
  169. package/dist/esm/collection/async-iterable-collection/_shared/async-skip-until-iterable.js.map +1 -0
  170. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-slice-iterable.js +4 -4
  171. package/dist/esm/collection/async-iterable-collection/_shared/async-slice-iterable.js.map +1 -0
  172. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-sliding-iterable.js +5 -5
  173. package/dist/esm/collection/async-iterable-collection/_shared/async-sliding-iterable.js.map +1 -0
  174. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-sort-iterable.js +4 -4
  175. package/dist/esm/collection/async-iterable-collection/_shared/async-sort-iterable.js.map +1 -0
  176. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-split-iterable.js +5 -5
  177. package/dist/esm/collection/async-iterable-collection/_shared/async-split-iterable.js.map +1 -0
  178. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-take-iterable.js +5 -5
  179. package/dist/esm/collection/async-iterable-collection/_shared/async-take-iterable.js.map +1 -0
  180. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-take-until-iterable.js +4 -4
  181. package/dist/esm/collection/async-iterable-collection/_shared/async-take-until-iterable.js.map +1 -0
  182. package/dist/esm/collection/async-iterable-collection/_shared/async-tap-iterable.js.map +1 -0
  183. package/dist/esm/collection/async-iterable-collection/_shared/async-timeout-iterable.js.map +1 -0
  184. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-unique-iterable.js +3 -3
  185. package/dist/esm/collection/async-iterable-collection/_shared/async-unique-iterable.js.map +1 -0
  186. package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-update-iterable.js +7 -7
  187. package/dist/esm/collection/async-iterable-collection/_shared/async-update-iterable.js.map +1 -0
  188. package/dist/esm/collection/async-iterable-collection/_shared/async-when-iterable.js.map +1 -0
  189. package/dist/esm/collection/async-iterable-collection/_shared/async-zip-iterable.js.map +1 -0
  190. package/dist/esm/collection/async-iterable-collection/async-iterable-collection.js +124 -112
  191. package/dist/esm/collection/async-iterable-collection/async-iterable-collection.js.map +1 -1
  192. package/dist/esm/collection/iterable-collection/_shared/_module.js +33 -0
  193. package/dist/esm/collection/iterable-collection/_shared/_module.js.map +1 -0
  194. package/dist/esm/collection/iterable-collection/_shared/chunk-iterable.js.map +1 -0
  195. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/chunk-whilte-iterable.js +7 -7
  196. package/dist/esm/collection/iterable-collection/_shared/chunk-whilte-iterable.js.map +1 -0
  197. package/dist/esm/collection/iterable-collection/_shared/collapse-iterable.js.map +1 -0
  198. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/count-by-iterable.js +7 -7
  199. package/dist/esm/collection/iterable-collection/_shared/count-by-iterable.js.map +1 -0
  200. package/dist/esm/collection/iterable-collection/_shared/cross-join-iterable.js.map +1 -0
  201. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/entries-iterable.js +4 -4
  202. package/dist/esm/collection/iterable-collection/_shared/entries-iterable.js.map +1 -0
  203. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/filter-iterable.js +7 -7
  204. package/dist/esm/collection/iterable-collection/_shared/filter-iterable.js.map +1 -0
  205. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/flat-map-iterable.js +7 -7
  206. package/dist/esm/collection/iterable-collection/_shared/flat-map-iterable.js.map +1 -0
  207. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/group-by-iterable.js +7 -7
  208. package/dist/esm/collection/iterable-collection/_shared/group-by-iterable.js.map +1 -0
  209. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/insert-after-iterable.js +8 -7
  210. package/dist/esm/collection/iterable-collection/_shared/insert-after-iterable.js.map +1 -0
  211. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/insert-before-iterable.js +8 -7
  212. package/dist/esm/collection/iterable-collection/_shared/insert-before-iterable.js.map +1 -0
  213. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/map-iterable.js +7 -7
  214. package/dist/esm/collection/iterable-collection/_shared/map-iterable.js.map +1 -0
  215. package/dist/esm/collection/iterable-collection/_shared/merge-iterable.js.map +1 -0
  216. package/dist/esm/collection/iterable-collection/_shared/pad-end-iterable.js.map +1 -0
  217. package/dist/esm/collection/iterable-collection/_shared/pad-start-iterable.js.map +1 -0
  218. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/partion-iterable.js +7 -7
  219. package/dist/esm/collection/iterable-collection/_shared/partion-iterable.js.map +1 -0
  220. package/dist/esm/collection/iterable-collection/_shared/repeat-iterable.js.map +1 -0
  221. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/reverse-iterable.js +5 -5
  222. package/dist/esm/collection/iterable-collection/_shared/reverse-iterable.js.map +1 -0
  223. package/dist/esm/collection/iterable-collection/_shared/shuffle-iterable.js.map +1 -0
  224. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/skip-iterable.js +6 -5
  225. package/dist/esm/collection/iterable-collection/_shared/skip-iterable.js.map +1 -0
  226. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/skip-until-iterable.js +7 -7
  227. package/dist/esm/collection/iterable-collection/_shared/skip-until-iterable.js.map +1 -0
  228. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/slice-iterable.js +4 -4
  229. package/dist/esm/collection/iterable-collection/_shared/slice-iterable.js.map +1 -0
  230. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/sliding-iterable.js +5 -5
  231. package/dist/esm/collection/iterable-collection/_shared/sliding-iterable.js.map +1 -0
  232. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/sort-iterable.js +4 -4
  233. package/dist/esm/collection/iterable-collection/_shared/sort-iterable.js.map +1 -0
  234. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/split-iterable.js +5 -5
  235. package/dist/esm/collection/iterable-collection/_shared/split-iterable.js.map +1 -0
  236. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/take-iterable.js +6 -5
  237. package/dist/esm/collection/iterable-collection/_shared/take-iterable.js.map +1 -0
  238. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/take-until-iterable.js +7 -7
  239. package/dist/esm/collection/iterable-collection/_shared/take-until-iterable.js.map +1 -0
  240. package/dist/esm/collection/iterable-collection/_shared/tap-iterable.js.map +1 -0
  241. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/unique-iterable.js +4 -4
  242. package/dist/esm/collection/iterable-collection/_shared/unique-iterable.js.map +1 -0
  243. package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/update-iterable.js +10 -10
  244. package/dist/esm/collection/iterable-collection/_shared/update-iterable.js.map +1 -0
  245. package/dist/esm/collection/iterable-collection/_shared/when-iterable.js.map +1 -0
  246. package/dist/esm/collection/iterable-collection/_shared/zip-iterable.js.map +1 -0
  247. package/dist/esm/collection/iterable-collection/iterable-collection.js +140 -123
  248. package/dist/esm/collection/iterable-collection/iterable-collection.js.map +1 -1
  249. package/dist/esm/collection/list-collection/list-collection.js +108 -76
  250. package/dist/esm/collection/list-collection/list-collection.js.map +1 -1
  251. package/dist/esm/contracts/_module.js +1 -1
  252. package/dist/esm/contracts/_module.js.map +1 -1
  253. package/dist/esm/contracts/collection/_module.js.map +1 -1
  254. package/dist/esm/contracts/collection/_shared.js +1 -1
  255. package/dist/esm/contracts/collection/_shared.js.map +1 -1
  256. package/dist/types/collection/_shared.d.ts +9 -3
  257. package/dist/types/collection/async-iterable-collection/_shared/_module.d.ts +35 -0
  258. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-chunk-whilte-iterable.d.ts +3 -3
  259. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-count-by-iterable.d.ts +2 -2
  260. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-entries-iterable.d.ts +2 -2
  261. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-filter-iterable.d.ts +3 -3
  262. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-flat-map-iterable.d.ts +3 -3
  263. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-group-by-iterable.d.ts +2 -2
  264. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-insert-after-iterable.d.ts +3 -3
  265. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-insert-before-iterable.d.ts +3 -3
  266. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-map-iterable.d.ts +3 -3
  267. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-partion-iterable.d.ts +3 -3
  268. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-reverse-iterable.d.ts +2 -2
  269. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-skip-iterable.d.ts +2 -2
  270. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-skip-until-iterable.d.ts +3 -3
  271. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-slice-iterable.d.ts +2 -2
  272. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-sliding-iterable.d.ts +2 -2
  273. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-sort-iterable.d.ts +2 -2
  274. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-split-iterable.d.ts +2 -2
  275. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-take-iterable.d.ts +2 -2
  276. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-take-until-iterable.d.ts +3 -3
  277. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-unique-iterable.d.ts +2 -2
  278. package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-update-iterable.d.ts +4 -4
  279. package/dist/types/collection/async-iterable-collection/async-iterable-collection.d.ts +56 -47
  280. package/dist/types/collection/iterable-collection/_shared/_module.d.ts +32 -0
  281. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/chunk-iterable.d.ts +3 -0
  282. package/dist/types/collection/iterable-collection/_shared/chunk-whilte-iterable.d.ts +12 -0
  283. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/collapse-iterable.d.ts +3 -0
  284. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/count-by-iterable.d.ts +6 -3
  285. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/cross-join-iterable.d.ts +3 -0
  286. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/entries-iterable.d.ts +5 -2
  287. package/dist/types/collection/iterable-collection/_shared/filter-iterable.d.ts +11 -0
  288. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/flat-map-iterable.d.ts +6 -3
  289. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/group-by-iterable.d.ts +6 -3
  290. package/dist/types/collection/iterable-collection/_shared/insert-after-iterable.d.ts +12 -0
  291. package/dist/types/collection/iterable-collection/_shared/insert-before-iterable.d.ts +12 -0
  292. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/map-iterable.d.ts +6 -3
  293. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/merge-iterable.d.ts +3 -0
  294. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/pad-end-iterable.d.ts +3 -0
  295. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/pad-start-iterable.d.ts +3 -0
  296. package/dist/types/collection/iterable-collection/_shared/partion-iterable.d.ts +12 -0
  297. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/repeat-iterable.d.ts +3 -0
  298. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/reverse-iterable.d.ts +5 -2
  299. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/shuffle-iterable.d.ts +3 -0
  300. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/skip-iterable.d.ts +5 -2
  301. package/dist/types/collection/iterable-collection/_shared/skip-until-iterable.d.ts +11 -0
  302. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/slice-iterable.d.ts +5 -2
  303. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/sliding-iterable.d.ts +5 -2
  304. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/sort-iterable.d.ts +5 -2
  305. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/split-iterable.d.ts +5 -2
  306. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/take-iterable.d.ts +5 -2
  307. package/dist/types/collection/iterable-collection/_shared/take-until-iterable.d.ts +11 -0
  308. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/tap-iterable.d.ts +3 -0
  309. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/unique-iterable.d.ts +5 -2
  310. package/dist/types/collection/iterable-collection/_shared/update-iterable.d.ts +12 -0
  311. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/when-iterable.d.ts +3 -0
  312. package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/zip-iterable.d.ts +3 -0
  313. package/dist/types/collection/iterable-collection/iterable-collection.d.ts +55 -46
  314. package/dist/types/collection/list-collection/list-collection.d.ts +55 -47
  315. package/dist/types/contracts/_module.d.ts +1 -1
  316. package/dist/types/contracts/collection/_module.d.ts +3 -0
  317. package/dist/types/contracts/collection/_shared.d.ts +123 -170
  318. package/dist/types/contracts/collection/async-collection.contract.d.ts +608 -188
  319. package/dist/types/contracts/collection/collection.contract.d.ts +548 -159
  320. package/package.json +8 -5
  321. package/.changeset/README.md +0 -8
  322. package/.changeset/config.json +0 -11
  323. package/.eslintignore +0 -3
  324. package/.eslintrc.json +0 -50
  325. package/.gitattributes +0 -6
  326. package/.github/workflows/main.yaml +0 -54
  327. package/.github/workflows/release.yaml +0 -31
  328. package/.prettierignore +0 -4
  329. package/.prettierrc.json +0 -4
  330. package/.vscode/settings.json +0 -46
  331. package/CHANGELOG.md +0 -13
  332. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/_module.js.map +0 -1
  333. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-abort-iterable.js.map +0 -1
  334. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-chunk-iterable.js.map +0 -1
  335. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-chunk-whilte-iterable.js.map +0 -1
  336. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-collapse-iterable.js.map +0 -1
  337. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-count-by-iterable.js.map +0 -1
  338. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-cross-join-iterable.js.map +0 -1
  339. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-delay-iterable.js.map +0 -1
  340. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-entries-iterable.js.map +0 -1
  341. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-filter-iterable.js.map +0 -1
  342. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-flat-map-iterable.js.map +0 -1
  343. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-group-by-iterable.js.map +0 -1
  344. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-insert-after-iterable.js.map +0 -1
  345. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-insert-before-iterable.js.map +0 -1
  346. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-map-iterable.js.map +0 -1
  347. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-merge-iterable.js.map +0 -1
  348. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-pad-end-iterable.js.map +0 -1
  349. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-pad-start-iterable.js.map +0 -1
  350. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-partion-iterable.js.map +0 -1
  351. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-repeat-iterable.js.map +0 -1
  352. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-reverse-iterable.js.map +0 -1
  353. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-shuffle-iterable.js.map +0 -1
  354. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-skip-iterable.js.map +0 -1
  355. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-skip-until-iterable.js.map +0 -1
  356. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-slice-iterable.js.map +0 -1
  357. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-sliding-iterable.js.map +0 -1
  358. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-sort-iterable.js.map +0 -1
  359. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-split-iterable.js.map +0 -1
  360. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-take-iterable.js.map +0 -1
  361. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-take-until-iterable.js.map +0 -1
  362. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-tap-iterable.js.map +0 -1
  363. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-timeout-iterable.js.map +0 -1
  364. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-unique-iterable.js.map +0 -1
  365. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-update-iterable.js.map +0 -1
  366. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-when-iterable.js.map +0 -1
  367. package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-zip-iterable.js.map +0 -1
  368. package/dist/cjs/collection/iterable-collection/iterable-helpers/_module.js +0 -49
  369. package/dist/cjs/collection/iterable-collection/iterable-helpers/_module.js.map +0 -1
  370. package/dist/cjs/collection/iterable-collection/iterable-helpers/chunk-iterable.js.map +0 -1
  371. package/dist/cjs/collection/iterable-collection/iterable-helpers/chunk-whilte-iterable.js.map +0 -1
  372. package/dist/cjs/collection/iterable-collection/iterable-helpers/collapse-iterable.js.map +0 -1
  373. package/dist/cjs/collection/iterable-collection/iterable-helpers/count-by-iterable.js.map +0 -1
  374. package/dist/cjs/collection/iterable-collection/iterable-helpers/cross-join-iterable.js.map +0 -1
  375. package/dist/cjs/collection/iterable-collection/iterable-helpers/entries-iterable.js.map +0 -1
  376. package/dist/cjs/collection/iterable-collection/iterable-helpers/filter-iterable.js.map +0 -1
  377. package/dist/cjs/collection/iterable-collection/iterable-helpers/flat-map-iterable.js.map +0 -1
  378. package/dist/cjs/collection/iterable-collection/iterable-helpers/group-by-iterable.js.map +0 -1
  379. package/dist/cjs/collection/iterable-collection/iterable-helpers/insert-after-iterable.js.map +0 -1
  380. package/dist/cjs/collection/iterable-collection/iterable-helpers/insert-before-iterable.js.map +0 -1
  381. package/dist/cjs/collection/iterable-collection/iterable-helpers/map-iterable.js.map +0 -1
  382. package/dist/cjs/collection/iterable-collection/iterable-helpers/merge-iterable.js.map +0 -1
  383. package/dist/cjs/collection/iterable-collection/iterable-helpers/pad-end-iterable.js.map +0 -1
  384. package/dist/cjs/collection/iterable-collection/iterable-helpers/pad-start-iterable.js.map +0 -1
  385. package/dist/cjs/collection/iterable-collection/iterable-helpers/partion-iterable.js.map +0 -1
  386. package/dist/cjs/collection/iterable-collection/iterable-helpers/repeat-iterable.js.map +0 -1
  387. package/dist/cjs/collection/iterable-collection/iterable-helpers/reverse-iterable.js.map +0 -1
  388. package/dist/cjs/collection/iterable-collection/iterable-helpers/shuffle-iterable.js.map +0 -1
  389. package/dist/cjs/collection/iterable-collection/iterable-helpers/skip-iterable.js.map +0 -1
  390. package/dist/cjs/collection/iterable-collection/iterable-helpers/skip-until-iterable.js.map +0 -1
  391. package/dist/cjs/collection/iterable-collection/iterable-helpers/slice-iterable.js.map +0 -1
  392. package/dist/cjs/collection/iterable-collection/iterable-helpers/sliding-iterable.js.map +0 -1
  393. package/dist/cjs/collection/iterable-collection/iterable-helpers/sort-iterable.js.map +0 -1
  394. package/dist/cjs/collection/iterable-collection/iterable-helpers/split-iterable.js.map +0 -1
  395. package/dist/cjs/collection/iterable-collection/iterable-helpers/take-iterable.js.map +0 -1
  396. package/dist/cjs/collection/iterable-collection/iterable-helpers/take-until-iterable.js.map +0 -1
  397. package/dist/cjs/collection/iterable-collection/iterable-helpers/tap-iterable.js.map +0 -1
  398. package/dist/cjs/collection/iterable-collection/iterable-helpers/unique-iterable.js.map +0 -1
  399. package/dist/cjs/collection/iterable-collection/iterable-helpers/update-iterable.js.map +0 -1
  400. package/dist/cjs/collection/iterable-collection/iterable-helpers/when-iterable.js.map +0 -1
  401. package/dist/cjs/collection/iterable-collection/iterable-helpers/zip-iterable.js.map +0 -1
  402. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/_module.js +0 -36
  403. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/_module.js.map +0 -1
  404. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-abort-iterable.js.map +0 -1
  405. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-chunk-iterable.js.map +0 -1
  406. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-chunk-whilte-iterable.js.map +0 -1
  407. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-collapse-iterable.js.map +0 -1
  408. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-count-by-iterable.js.map +0 -1
  409. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-cross-join-iterable.js.map +0 -1
  410. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-delay-iterable.js.map +0 -1
  411. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-entries-iterable.js.map +0 -1
  412. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-filter-iterable.js.map +0 -1
  413. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-flat-map-iterable.js.map +0 -1
  414. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-group-by-iterable.js.map +0 -1
  415. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-insert-after-iterable.js.map +0 -1
  416. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-insert-before-iterable.js.map +0 -1
  417. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-map-iterable.js.map +0 -1
  418. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-merge-iterable.js.map +0 -1
  419. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-pad-end-iterable.js.map +0 -1
  420. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-pad-start-iterable.js.map +0 -1
  421. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-partion-iterable.js.map +0 -1
  422. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-repeat-iterable.js.map +0 -1
  423. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-reverse-iterable.js.map +0 -1
  424. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-shuffle-iterable.js.map +0 -1
  425. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-skip-iterable.js.map +0 -1
  426. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-skip-until-iterable.js.map +0 -1
  427. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-slice-iterable.js.map +0 -1
  428. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-sliding-iterable.js.map +0 -1
  429. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-sort-iterable.js.map +0 -1
  430. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-split-iterable.js.map +0 -1
  431. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-take-iterable.js.map +0 -1
  432. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-take-until-iterable.js.map +0 -1
  433. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-tap-iterable.js.map +0 -1
  434. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-timeout-iterable.js.map +0 -1
  435. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-unique-iterable.js.map +0 -1
  436. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-update-iterable.js.map +0 -1
  437. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-when-iterable.js.map +0 -1
  438. package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-zip-iterable.js.map +0 -1
  439. package/dist/esm/collection/iterable-collection/iterable-helpers/_module.js +0 -33
  440. package/dist/esm/collection/iterable-collection/iterable-helpers/_module.js.map +0 -1
  441. package/dist/esm/collection/iterable-collection/iterable-helpers/chunk-iterable.js.map +0 -1
  442. package/dist/esm/collection/iterable-collection/iterable-helpers/chunk-whilte-iterable.js.map +0 -1
  443. package/dist/esm/collection/iterable-collection/iterable-helpers/collapse-iterable.js.map +0 -1
  444. package/dist/esm/collection/iterable-collection/iterable-helpers/count-by-iterable.js.map +0 -1
  445. package/dist/esm/collection/iterable-collection/iterable-helpers/cross-join-iterable.js.map +0 -1
  446. package/dist/esm/collection/iterable-collection/iterable-helpers/entries-iterable.js.map +0 -1
  447. package/dist/esm/collection/iterable-collection/iterable-helpers/filter-iterable.js.map +0 -1
  448. package/dist/esm/collection/iterable-collection/iterable-helpers/flat-map-iterable.js.map +0 -1
  449. package/dist/esm/collection/iterable-collection/iterable-helpers/group-by-iterable.js.map +0 -1
  450. package/dist/esm/collection/iterable-collection/iterable-helpers/insert-after-iterable.js.map +0 -1
  451. package/dist/esm/collection/iterable-collection/iterable-helpers/insert-before-iterable.js.map +0 -1
  452. package/dist/esm/collection/iterable-collection/iterable-helpers/map-iterable.js.map +0 -1
  453. package/dist/esm/collection/iterable-collection/iterable-helpers/merge-iterable.js.map +0 -1
  454. package/dist/esm/collection/iterable-collection/iterable-helpers/pad-end-iterable.js.map +0 -1
  455. package/dist/esm/collection/iterable-collection/iterable-helpers/pad-start-iterable.js.map +0 -1
  456. package/dist/esm/collection/iterable-collection/iterable-helpers/partion-iterable.js.map +0 -1
  457. package/dist/esm/collection/iterable-collection/iterable-helpers/repeat-iterable.js.map +0 -1
  458. package/dist/esm/collection/iterable-collection/iterable-helpers/reverse-iterable.js.map +0 -1
  459. package/dist/esm/collection/iterable-collection/iterable-helpers/shuffle-iterable.js.map +0 -1
  460. package/dist/esm/collection/iterable-collection/iterable-helpers/skip-iterable.js.map +0 -1
  461. package/dist/esm/collection/iterable-collection/iterable-helpers/skip-until-iterable.js.map +0 -1
  462. package/dist/esm/collection/iterable-collection/iterable-helpers/slice-iterable.js.map +0 -1
  463. package/dist/esm/collection/iterable-collection/iterable-helpers/sliding-iterable.js.map +0 -1
  464. package/dist/esm/collection/iterable-collection/iterable-helpers/sort-iterable.js.map +0 -1
  465. package/dist/esm/collection/iterable-collection/iterable-helpers/split-iterable.js.map +0 -1
  466. package/dist/esm/collection/iterable-collection/iterable-helpers/take-iterable.js.map +0 -1
  467. package/dist/esm/collection/iterable-collection/iterable-helpers/take-until-iterable.js.map +0 -1
  468. package/dist/esm/collection/iterable-collection/iterable-helpers/tap-iterable.js.map +0 -1
  469. package/dist/esm/collection/iterable-collection/iterable-helpers/unique-iterable.js.map +0 -1
  470. package/dist/esm/collection/iterable-collection/iterable-helpers/update-iterable.js.map +0 -1
  471. package/dist/esm/collection/iterable-collection/iterable-helpers/when-iterable.js.map +0 -1
  472. package/dist/esm/collection/iterable-collection/iterable-helpers/zip-iterable.js.map +0 -1
  473. package/dist/types/collection/async-iterable-collection/async-iterable-helpers/_module.d.ts +0 -35
  474. package/dist/types/collection/iterable-collection/iterable-helpers/_module.d.ts +0 -32
  475. package/dist/types/collection/iterable-collection/iterable-helpers/chunk-whilte-iterable.d.ts +0 -9
  476. package/dist/types/collection/iterable-collection/iterable-helpers/filter-iterable.d.ts +0 -8
  477. package/dist/types/collection/iterable-collection/iterable-helpers/insert-after-iterable.d.ts +0 -9
  478. package/dist/types/collection/iterable-collection/iterable-helpers/insert-before-iterable.d.ts +0 -9
  479. package/dist/types/collection/iterable-collection/iterable-helpers/partion-iterable.d.ts +0 -9
  480. package/dist/types/collection/iterable-collection/iterable-helpers/skip-until-iterable.d.ts +0 -8
  481. package/dist/types/collection/iterable-collection/iterable-helpers/take-until-iterable.d.ts +0 -8
  482. package/dist/types/collection/iterable-collection/iterable-helpers/update-iterable.d.ts +0 -9
  483. package/docs-api/.nojekyll +0 -1
  484. package/docs-api/assets/highlight.css +0 -92
  485. package/docs-api/assets/icons.js +0 -18
  486. package/docs-api/assets/icons.svg +0 -1
  487. package/docs-api/assets/main.js +0 -60
  488. package/docs-api/assets/navigation.js +0 -1
  489. package/docs-api/assets/search.js +0 -1
  490. package/docs-api/assets/style.css +0 -1448
  491. package/docs-api/classes/AsyncIterableCollection.html +0 -437
  492. package/docs-api/classes/CollectionError.html +0 -12
  493. package/docs-api/classes/IndexOverflowError.html +0 -12
  494. package/docs-api/classes/ItemNotFoundError.html +0 -12
  495. package/docs-api/classes/IterableCollection.html +0 -434
  496. package/docs-api/classes/ListCollection.html +0 -434
  497. package/docs-api/classes/MultipleItemsFoundError.html +0 -12
  498. package/docs-api/classes/UnexpectedCollectionError.html +0 -12
  499. package/docs-api/functions/isAsyncIterable.html +0 -1
  500. package/docs-api/functions/isIterable.html +0 -1
  501. package/docs-api/functions/range.html +0 -4
  502. package/docs-api/hierarchy.html +0 -1
  503. package/docs-api/index.html +0 -1
  504. package/docs-api/modules.html +0 -60
  505. package/docs-api/types/AsyncCollapse.html +0 -1
  506. package/docs-api/types/AsyncFilter.html +0 -1
  507. package/docs-api/types/AsyncFilter_.html +0 -1
  508. package/docs-api/types/AsyncFindOrSettings.html +0 -1
  509. package/docs-api/types/AsyncFindSettings.html +0 -1
  510. package/docs-api/types/AsyncForEach.html +0 -1
  511. package/docs-api/types/AsyncForEach_.html +0 -1
  512. package/docs-api/types/AsyncGroupBySettings.html +0 -1
  513. package/docs-api/types/AsyncIterableValue.html +0 -1
  514. package/docs-api/types/AsyncLazyable.html +0 -1
  515. package/docs-api/types/AsyncLazyable_.html +0 -1
  516. package/docs-api/types/AsyncMap.html +0 -1
  517. package/docs-api/types/AsyncMap_.html +0 -1
  518. package/docs-api/types/AsyncModifier.html +0 -1
  519. package/docs-api/types/AsyncModifier_.html +0 -1
  520. package/docs-api/types/AsyncReduce.html +0 -1
  521. package/docs-api/types/AsyncReduceSettings.html +0 -1
  522. package/docs-api/types/AsyncReduce_.html +0 -1
  523. package/docs-api/types/AsyncTap.html +0 -1
  524. package/docs-api/types/AsyncTap_.html +0 -1
  525. package/docs-api/types/AsyncTransform.html +0 -1
  526. package/docs-api/types/AsyncTransform_.html +0 -1
  527. package/docs-api/types/Collapse.html +0 -1
  528. package/docs-api/types/Comparator.html +0 -1
  529. package/docs-api/types/EnsureType.html +0 -1
  530. package/docs-api/types/Filter.html +0 -1
  531. package/docs-api/types/FilterGuard.html +0 -1
  532. package/docs-api/types/Filter_.html +0 -1
  533. package/docs-api/types/FindOrSettings.html +0 -1
  534. package/docs-api/types/FindSettings.html +0 -1
  535. package/docs-api/types/ForEach.html +0 -1
  536. package/docs-api/types/GroupBySettings.html +0 -1
  537. package/docs-api/types/IAsyncCollection.html +0 -357
  538. package/docs-api/types/ICollection.html +0 -357
  539. package/docs-api/types/JoinSettings.html +0 -1
  540. package/docs-api/types/Lazyable.html +0 -1
  541. package/docs-api/types/Map.html +0 -1
  542. package/docs-api/types/Modifier.html +0 -1
  543. package/docs-api/types/PageSettings.html +0 -1
  544. package/docs-api/types/RecordItem.html +0 -1
  545. package/docs-api/types/Reduce.html +0 -1
  546. package/docs-api/types/ReduceSettings.html +0 -1
  547. package/docs-api/types/ReverseSettings.html +0 -1
  548. package/docs-api/types/SliceSettings.html +0 -1
  549. package/docs-api/types/SlidingSettings.html +0 -1
  550. package/docs-api/types/Tap.html +0 -1
  551. package/docs-api/types/Transform.html +0 -1
  552. package/docs-api/types/UpdatedItem.html +0 -1
  553. package/src/_module.ts +0 -2
  554. package/src/collection/_module.ts +0 -4
  555. package/src/collection/_shared.ts +0 -45
  556. package/src/collection/async-iterable-collection/_module.ts +0 -1
  557. package/src/collection/async-iterable-collection/async-iterable-collection.test.ts +0 -3195
  558. package/src/collection/async-iterable-collection/async-iterable-collection.ts +0 -1276
  559. package/src/collection/async-iterable-collection/async-iterable-helpers/_module.ts +0 -35
  560. package/src/collection/async-iterable-collection/async-iterable-helpers/async-abort-iterable.ts +0 -25
  561. package/src/collection/async-iterable-collection/async-iterable-helpers/async-chunk-iterable.ts +0 -57
  562. package/src/collection/async-iterable-collection/async-iterable-helpers/async-chunk-whilte-iterable.ts +0 -54
  563. package/src/collection/async-iterable-collection/async-iterable-helpers/async-collapse-iterable.ts +0 -40
  564. package/src/collection/async-iterable-collection/async-iterable-helpers/async-count-by-iterable.ts +0 -58
  565. package/src/collection/async-iterable-collection/async-iterable-helpers/async-cross-join-iterable.ts +0 -69
  566. package/src/collection/async-iterable-collection/async-iterable-helpers/async-delay-iterable.ts +0 -19
  567. package/src/collection/async-iterable-collection/async-iterable-helpers/async-entries-iterable.ts +0 -28
  568. package/src/collection/async-iterable-collection/async-iterable-helpers/async-filter-iterable.ts +0 -42
  569. package/src/collection/async-iterable-collection/async-iterable-helpers/async-flat-map-iterable.ts +0 -44
  570. package/src/collection/async-iterable-collection/async-iterable-helpers/async-group-by-iterable.ts +0 -48
  571. package/src/collection/async-iterable-collection/async-iterable-helpers/async-insert-after-iterable.ts +0 -57
  572. package/src/collection/async-iterable-collection/async-iterable-helpers/async-insert-before-iterable.ts +0 -57
  573. package/src/collection/async-iterable-collection/async-iterable-helpers/async-map-iterable.ts +0 -40
  574. package/src/collection/async-iterable-collection/async-iterable-helpers/async-merge-iterable.ts +0 -35
  575. package/src/collection/async-iterable-collection/async-iterable-helpers/async-pad-end-iterable.ts +0 -41
  576. package/src/collection/async-iterable-collection/async-iterable-helpers/async-pad-start-iterable.ts +0 -41
  577. package/src/collection/async-iterable-collection/async-iterable-helpers/async-partion-iterable.ts +0 -63
  578. package/src/collection/async-iterable-collection/async-iterable-helpers/async-repeat-iterable.ts +0 -40
  579. package/src/collection/async-iterable-collection/async-iterable-helpers/async-reverse-iterable.ts +0 -35
  580. package/src/collection/async-iterable-collection/async-iterable-helpers/async-shuffle-iterable.ts +0 -23
  581. package/src/collection/async-iterable-collection/async-iterable-helpers/async-skip-iterable.ts +0 -41
  582. package/src/collection/async-iterable-collection/async-iterable-helpers/async-skip-until-iterable.ts +0 -55
  583. package/src/collection/async-iterable-collection/async-iterable-helpers/async-slice-iterable.ts +0 -33
  584. package/src/collection/async-iterable-collection/async-iterable-helpers/async-sliding-iterable.ts +0 -54
  585. package/src/collection/async-iterable-collection/async-iterable-helpers/async-sort-iterable.ts +0 -18
  586. package/src/collection/async-iterable-collection/async-iterable-helpers/async-split-iterable.ts +0 -64
  587. package/src/collection/async-iterable-collection/async-iterable-helpers/async-take-iterable.ts +0 -41
  588. package/src/collection/async-iterable-collection/async-iterable-helpers/async-take-until-iterable.ts +0 -41
  589. package/src/collection/async-iterable-collection/async-iterable-helpers/async-tap-iterable.ts +0 -34
  590. package/src/collection/async-iterable-collection/async-iterable-helpers/async-timeout-iterable.ts +0 -20
  591. package/src/collection/async-iterable-collection/async-iterable-helpers/async-unique-iterable.ts +0 -49
  592. package/src/collection/async-iterable-collection/async-iterable-helpers/async-update-iterable.ts +0 -64
  593. package/src/collection/async-iterable-collection/async-iterable-helpers/async-when-iterable.ts +0 -43
  594. package/src/collection/async-iterable-collection/async-iterable-helpers/async-zip-iterable.ts +0 -45
  595. package/src/collection/iterable-collection/_module.ts +0 -1
  596. package/src/collection/iterable-collection/iterable-collection.test.ts +0 -2379
  597. package/src/collection/iterable-collection/iterable-collection.ts +0 -1317
  598. package/src/collection/iterable-collection/iterable-helpers/_module.ts +0 -32
  599. package/src/collection/iterable-collection/iterable-helpers/chunk-iterable.ts +0 -49
  600. package/src/collection/iterable-collection/iterable-helpers/chunk-whilte-iterable.ts +0 -51
  601. package/src/collection/iterable-collection/iterable-helpers/collapse-iterable.ts +0 -35
  602. package/src/collection/iterable-collection/iterable-helpers/count-by-iterable.ts +0 -49
  603. package/src/collection/iterable-collection/iterable-helpers/cross-join-iterable.ts +0 -57
  604. package/src/collection/iterable-collection/iterable-helpers/entries-iterable.ts +0 -42
  605. package/src/collection/iterable-collection/iterable-helpers/filter-iterable.ts +0 -39
  606. package/src/collection/iterable-collection/iterable-helpers/flat-map-iterable.ts +0 -35
  607. package/src/collection/iterable-collection/iterable-helpers/group-by-iterable.ts +0 -52
  608. package/src/collection/iterable-collection/iterable-helpers/insert-after-iterable.ts +0 -43
  609. package/src/collection/iterable-collection/iterable-helpers/insert-before-iterable.ts +0 -43
  610. package/src/collection/iterable-collection/iterable-helpers/map-iterable.ts +0 -35
  611. package/src/collection/iterable-collection/iterable-helpers/merge-iterable.ts +0 -31
  612. package/src/collection/iterable-collection/iterable-helpers/pad-end-iterable.ts +0 -52
  613. package/src/collection/iterable-collection/iterable-helpers/pad-start-iterable.ts +0 -52
  614. package/src/collection/iterable-collection/iterable-helpers/partion-iterable.ts +0 -46
  615. package/src/collection/iterable-collection/iterable-helpers/repeat-iterable.ts +0 -36
  616. package/src/collection/iterable-collection/iterable-helpers/reverse-iterable.ts +0 -46
  617. package/src/collection/iterable-collection/iterable-helpers/shuffle-iterable.ts +0 -36
  618. package/src/collection/iterable-collection/iterable-helpers/skip-iterable.ts +0 -37
  619. package/src/collection/iterable-collection/iterable-helpers/skip-until-iterable.ts +0 -41
  620. package/src/collection/iterable-collection/iterable-helpers/slice-iterable.ts +0 -47
  621. package/src/collection/iterable-collection/iterable-helpers/sliding-iterable.ts +0 -49
  622. package/src/collection/iterable-collection/iterable-helpers/sort-iterable.ts +0 -29
  623. package/src/collection/iterable-collection/iterable-helpers/split-iterable.ts +0 -58
  624. package/src/collection/iterable-collection/iterable-helpers/take-iterable.ts +0 -37
  625. package/src/collection/iterable-collection/iterable-helpers/take-until-iterable.ts +0 -38
  626. package/src/collection/iterable-collection/iterable-helpers/tap-iterable.ts +0 -31
  627. package/src/collection/iterable-collection/iterable-helpers/unique-iterable.ts +0 -43
  628. package/src/collection/iterable-collection/iterable-helpers/update-iterable.ts +0 -50
  629. package/src/collection/iterable-collection/iterable-helpers/when-iterable.ts +0 -37
  630. package/src/collection/iterable-collection/iterable-helpers/zip-iterable.ts +0 -41
  631. package/src/collection/list-collection/_module.ts +0 -1
  632. package/src/collection/list-collection/list-collection.test.ts +0 -2280
  633. package/src/collection/list-collection/list-collection.ts +0 -1883
  634. package/src/contracts/_module.ts +0 -1
  635. package/src/contracts/collection/_module.ts +0 -3
  636. package/src/contracts/collection/_shared.ts +0 -346
  637. package/src/contracts/collection/async-collection.contract.ts +0 -1028
  638. package/src/contracts/collection/collection.contract.ts +0 -978
  639. package/src/types.ts +0 -2
  640. package/tsconfig.base.json +0 -31
  641. package/tsconfig.cjs.json +0 -12
  642. package/tsconfig.esm.json +0 -12
  643. package/tsconfig.json +0 -10
  644. package/tsconfig.types.json +0 -12
  645. package/vite.config.ts +0 -6
  646. /package/dist/cjs/{types.js → _shared/types.js} +0 -0
  647. /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-abort-iterable.js +0 -0
  648. /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-chunk-iterable.js +0 -0
  649. /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-collapse-iterable.js +0 -0
  650. /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-cross-join-iterable.js +0 -0
  651. /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-merge-iterable.js +0 -0
  652. /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-pad-end-iterable.js +0 -0
  653. /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-pad-start-iterable.js +0 -0
  654. /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-repeat-iterable.js +0 -0
  655. /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-shuffle-iterable.js +0 -0
  656. /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-tap-iterable.js +0 -0
  657. /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-timeout-iterable.js +0 -0
  658. /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-when-iterable.js +0 -0
  659. /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-zip-iterable.js +0 -0
  660. /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/chunk-iterable.js +0 -0
  661. /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/collapse-iterable.js +0 -0
  662. /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/cross-join-iterable.js +0 -0
  663. /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/merge-iterable.js +0 -0
  664. /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/pad-end-iterable.js +0 -0
  665. /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/pad-start-iterable.js +0 -0
  666. /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/repeat-iterable.js +0 -0
  667. /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/shuffle-iterable.js +0 -0
  668. /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/tap-iterable.js +0 -0
  669. /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/when-iterable.js +0 -0
  670. /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/zip-iterable.js +0 -0
  671. /package/dist/esm/{types.js → _shared/types.js} +0 -0
  672. /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-abort-iterable.js +0 -0
  673. /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-chunk-iterable.js +0 -0
  674. /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-collapse-iterable.js +0 -0
  675. /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-cross-join-iterable.js +0 -0
  676. /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-merge-iterable.js +0 -0
  677. /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-pad-end-iterable.js +0 -0
  678. /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-pad-start-iterable.js +0 -0
  679. /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-repeat-iterable.js +0 -0
  680. /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-shuffle-iterable.js +0 -0
  681. /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-tap-iterable.js +0 -0
  682. /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-timeout-iterable.js +0 -0
  683. /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-when-iterable.js +0 -0
  684. /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-zip-iterable.js +0 -0
  685. /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/chunk-iterable.js +0 -0
  686. /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/collapse-iterable.js +0 -0
  687. /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/cross-join-iterable.js +0 -0
  688. /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/merge-iterable.js +0 -0
  689. /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/pad-end-iterable.js +0 -0
  690. /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/pad-start-iterable.js +0 -0
  691. /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/repeat-iterable.js +0 -0
  692. /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/shuffle-iterable.js +0 -0
  693. /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/tap-iterable.js +0 -0
  694. /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/when-iterable.js +0 -0
  695. /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/zip-iterable.js +0 -0
  696. /package/dist/types/{types.d.ts → _shared/types.d.ts} +0 -0
  697. /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-abort-iterable.d.ts +0 -0
  698. /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-chunk-iterable.d.ts +0 -0
  699. /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-collapse-iterable.d.ts +0 -0
  700. /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-cross-join-iterable.d.ts +0 -0
  701. /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-delay-iterable.d.ts +0 -0
  702. /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-merge-iterable.d.ts +0 -0
  703. /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-pad-end-iterable.d.ts +0 -0
  704. /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-pad-start-iterable.d.ts +0 -0
  705. /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-repeat-iterable.d.ts +0 -0
  706. /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-shuffle-iterable.d.ts +0 -0
  707. /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-tap-iterable.d.ts +0 -0
  708. /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-timeout-iterable.d.ts +0 -0
  709. /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-when-iterable.d.ts +0 -0
  710. /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-zip-iterable.d.ts +0 -0
@@ -1,1276 +0,0 @@
1
- import {
2
- type AsyncCollapse,
3
- type AsyncFilter,
4
- type AsyncFindOrSettings,
5
- type AsyncFindSettings,
6
- type AsyncForEach,
7
- type AsyncGroupBySettings,
8
- type AsyncIterableValue,
9
- type AsyncLazyable,
10
- type AsyncMap,
11
- type AsyncModifier,
12
- type AsyncReduceSettings,
13
- type AsyncTap,
14
- type AsyncTransform,
15
- CollectionError,
16
- type Comparator,
17
- type IAsyncCollection,
18
- ItemNotFoundError,
19
- type JoinSettings,
20
- MultipleItemsFoundError,
21
- IndexOverflowError,
22
- type PageSettings,
23
- type RecordItem,
24
- type ReverseSettings,
25
- type SliceSettings,
26
- type SlidingSettings,
27
- UnexpectedCollectionError,
28
- type UpdatedItem,
29
- } from "@/contracts/collection/_module";
30
- import {
31
- AsyncCrossJoinIterable,
32
- AsyncSlidingIteralbe,
33
- AsyncShuffleIterable,
34
- AsyncEntriesIterable,
35
- AsyncFilterIterable,
36
- AsyncChunkIterable,
37
- AsyncChunkWhileIterable,
38
- AsyncCollapseIterable,
39
- AsyncCountByIterable,
40
- AsyncFlatMapIterable,
41
- AsyncGroupByIterable,
42
- AsyncInsertAfterIterable,
43
- AsyncInsertBeforeIterable,
44
- AsyncMapIterable,
45
- AsyncMergeIterable,
46
- AsyncPadEndIterable,
47
- AsyncPadStartIterable,
48
- AsyncPartionIterable,
49
- AsyncSkipIterable,
50
- AsyncSkipUntilIterable,
51
- AsyncSortIterable,
52
- AsyncSplitIterable,
53
- AsyncTakeIterable,
54
- AsyncTakeUntilIterable,
55
- AsyncTapIterable,
56
- AsyncUniqueIterable,
57
- AsyncUpdateIterable,
58
- AsyncWhenIterable,
59
- AsyncZipIterable,
60
- AsyncReverseIterable,
61
- AsyncSliceIterable,
62
- AsyncRepeatIterable,
63
- AsyncAbortIterable,
64
- AsyncDelayIterable,
65
- AsyncTimeoutIterable,
66
- } from "@/collection/async-iterable-collection/async-iterable-helpers/_module";
67
- import { EnsureType } from "@/types";
68
-
69
- /**
70
- * Most methods in AsyncIterableCollection are lazy and will only execute when calling methods return values or iterating through an IterableCollection by using for of loop
71
- * @group Collections
72
- */
73
- export class AsyncIterableCollection<TInput>
74
- implements IAsyncCollection<TInput>
75
- {
76
- private static THROW_ON_NUMBER_LIMIT = false;
77
-
78
- private static DEFAULT_CHUNK_SIZE = 1024;
79
-
80
- private static makeCollection = <TInput>(
81
- iterable: AsyncIterableValue<TInput>,
82
- ): IAsyncCollection<TInput> => {
83
- return new AsyncIterableCollection<TInput>(iterable);
84
- };
85
-
86
- constructor(private iterable: AsyncIterableValue<TInput>) {}
87
-
88
- async *[Symbol.asyncIterator](): AsyncIterator<TInput> {
89
- yield* this.iterable;
90
- }
91
-
92
- iterator(): AsyncIterator<TInput, void> {
93
- return this[Symbol.asyncIterator]() as AsyncIterator<TInput, void>;
94
- }
95
-
96
- entries(
97
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
98
- ): IAsyncCollection<RecordItem<number, TInput>> {
99
- return new AsyncIterableCollection(
100
- new AsyncEntriesIterable(this, throwOnNumberLimit),
101
- );
102
- }
103
-
104
- keys(
105
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
106
- ): IAsyncCollection<number> {
107
- return this.entries(throwOnNumberLimit).map(([key]) => key);
108
- }
109
-
110
- values(): IAsyncCollection<TInput> {
111
- return this.entries().map(([_key, value]) => value);
112
- }
113
-
114
- filter<TOutput extends TInput>(
115
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>, TOutput>,
116
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
117
- ): IAsyncCollection<TOutput> {
118
- return new AsyncIterableCollection<TOutput>(
119
- new AsyncFilterIterable(this, filter, throwOnNumberLimit),
120
- );
121
- }
122
-
123
- map<TOutput>(
124
- map: AsyncMap<TInput, IAsyncCollection<TInput>, TOutput>,
125
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
126
- ): IAsyncCollection<TOutput> {
127
- return new AsyncIterableCollection(
128
- new AsyncMapIterable(this, map, throwOnNumberLimit),
129
- );
130
- }
131
-
132
- async reduce<TOutput = TInput>(
133
- settings: AsyncReduceSettings<
134
- TInput,
135
- IAsyncCollection<TInput>,
136
- TOutput
137
- >,
138
- ): Promise<TOutput> {
139
- const { reduceFn: reduce, initialValue, throwOnNumberLimit } = settings;
140
- if (initialValue === undefined && (await this.empty())) {
141
- throw new TypeError(
142
- "Reduce of empty array must be inputed a initial value",
143
- );
144
- }
145
- if (initialValue !== undefined) {
146
- let output = initialValue as TOutput;
147
-
148
- for await (const [index, item] of this.entries()) {
149
- output = await reduce(output, item, index, this);
150
- }
151
- return output;
152
- }
153
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment
154
- let output: TOutput = (await this.firstOrFail()) as any,
155
- index = 0,
156
- isFirstIteration = true;
157
- for await (const item of this) {
158
- if (!isFirstIteration) {
159
- if (throwOnNumberLimit && index === Number.MAX_SAFE_INTEGER) {
160
- throw new IndexOverflowError("Index has overflowed");
161
- }
162
- output = await reduce(output, item, index, this);
163
- }
164
- isFirstIteration = false;
165
- index++;
166
- }
167
- return output;
168
- }
169
-
170
- async join(settings?: JoinSettings): Promise<string> {
171
- return this.reduce({
172
- reduceFn(str, item) {
173
- if (typeof item !== "string") {
174
- throw new TypeError("Item type is invalid must be string");
175
- }
176
- const separator = settings?.seperator ?? ",";
177
- return str + separator + item;
178
- },
179
- throwOnNumberLimit:
180
- settings?.throwOnNumberLimit ??
181
- AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
182
- });
183
- }
184
-
185
- collapse(): IAsyncCollection<AsyncCollapse<TInput>> {
186
- return new AsyncIterableCollection(new AsyncCollapseIterable(this));
187
- }
188
-
189
- flatMap<TOutput>(
190
- map: AsyncMap<TInput, IAsyncCollection<TInput>, Iterable<TOutput>>,
191
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
192
- ): IAsyncCollection<TOutput> {
193
- return new AsyncIterableCollection(
194
- new AsyncFlatMapIterable(this, map, throwOnNumberLimit),
195
- );
196
- }
197
-
198
- update<TFilterOutput extends TInput, TMapOutput>(
199
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>, TFilterOutput>,
200
- map: AsyncMap<TFilterOutput, IAsyncCollection<TInput>, TMapOutput>,
201
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
202
- ): IAsyncCollection<UpdatedItem<TInput, TFilterOutput, TMapOutput>> {
203
- return new AsyncIterableCollection(
204
- new AsyncUpdateIterable(this, filter, map, throwOnNumberLimit),
205
- );
206
- }
207
-
208
- page(settings: PageSettings): IAsyncCollection<TInput> {
209
- const { page, pageSize, throwOnNumberLimit } = settings;
210
- if (page < 0) {
211
- return this.skip(page * pageSize, throwOnNumberLimit).take(
212
- pageSize,
213
- throwOnNumberLimit,
214
- );
215
- }
216
- return this.skip((page - 1) * pageSize, throwOnNumberLimit).take(
217
- page * pageSize,
218
- throwOnNumberLimit,
219
- );
220
- }
221
-
222
- async sum(
223
- throwOnNumberLimit?: boolean,
224
- ): Promise<EnsureType<TInput, number>> {
225
- try {
226
- let sum = 0;
227
- for await (const item of this) {
228
- if (throwOnNumberLimit && sum === Number.MAX_SAFE_INTEGER) {
229
- throw new IndexOverflowError("Sum has overflowed");
230
- }
231
- if (typeof item !== "number") {
232
- throw new TypeError("Item type is invalid must be number");
233
- }
234
- sum += item;
235
- }
236
- return sum as EnsureType<TInput, number>;
237
- } catch (error: unknown) {
238
- if (
239
- error instanceof CollectionError ||
240
- error instanceof TypeError
241
- ) {
242
- throw error;
243
- }
244
- throw new UnexpectedCollectionError(
245
- `Unexpected error "${String(error)}" occured`,
246
- error,
247
- );
248
- }
249
- }
250
-
251
- async average(
252
- throwOnNumberLimit?: boolean,
253
- ): Promise<EnsureType<TInput, number>> {
254
- try {
255
- let size = 0,
256
- sum = 0;
257
- for await (const item of this) {
258
- if (throwOnNumberLimit && sum === Number.MAX_SAFE_INTEGER) {
259
- throw new IndexOverflowError("The sum has overflowed");
260
- }
261
- if (throwOnNumberLimit && size === Number.MAX_SAFE_INTEGER) {
262
- throw new IndexOverflowError("The size has overflowed");
263
- }
264
- if (typeof item !== "number") {
265
- throw new TypeError("Item type is invalid must be number");
266
- }
267
- size++;
268
- sum += item;
269
- }
270
- return (sum / size) as EnsureType<TInput, number>;
271
- } catch (error: unknown) {
272
- if (
273
- error instanceof CollectionError ||
274
- error instanceof TypeError
275
- ) {
276
- throw error;
277
- }
278
- throw new UnexpectedCollectionError(
279
- `Unexpected error "${String(error)}" occured`,
280
- error,
281
- );
282
- }
283
- }
284
-
285
- async median(
286
- throwOnNumberLimit?: boolean,
287
- ): Promise<EnsureType<TInput, number>> {
288
- if (await this.empty()) {
289
- return 0 as EnsureType<TInput, number>;
290
- }
291
- const size = await this.size(throwOnNumberLimit);
292
- if (size === 0) {
293
- return 0 as EnsureType<TInput, number>;
294
- }
295
- const isEven = size % 2 === 0,
296
- items = await this.map((item) => {
297
- if (typeof item !== "number") {
298
- throw new TypeError("Item type is invalid must be number");
299
- }
300
- return item;
301
- }, throwOnNumberLimit)
302
- .filter((_item, index) => {
303
- if (isEven) {
304
- return index === size / 2 || index === size / 2 - 1;
305
- }
306
- return index === Math.floor(size / 2);
307
- }, throwOnNumberLimit)
308
-
309
- .toArray();
310
- if (isEven) {
311
- const [a, b] = items;
312
- if (a === undefined) {
313
- throw new UnexpectedCollectionError("Is in invalid state");
314
- }
315
- if (b === undefined) {
316
- throw new UnexpectedCollectionError("Is in invalid state");
317
- }
318
- return ((a + b) / 2) as EnsureType<TInput, number>;
319
- }
320
- const [median] = items;
321
- if (median === undefined) {
322
- throw new UnexpectedCollectionError("Is in invalid state");
323
- }
324
- return median as EnsureType<TInput, number>;
325
- }
326
-
327
- async min(): Promise<EnsureType<TInput, number>> {
328
- try {
329
- let min = 0;
330
- for await (const item of this) {
331
- if (typeof item !== "number") {
332
- throw new TypeError("Item type is invalid must be number");
333
- }
334
- if (min === 0) {
335
- min = item;
336
- } else if (min > item) {
337
- min = item;
338
- }
339
- }
340
- return min as EnsureType<TInput, number>;
341
- } catch (error: unknown) {
342
- if (
343
- error instanceof CollectionError ||
344
- error instanceof TypeError
345
- ) {
346
- throw error;
347
- }
348
- throw new UnexpectedCollectionError(
349
- `Unexpected error "${String(error)}" occured`,
350
- error,
351
- );
352
- }
353
- }
354
-
355
- async max(): Promise<EnsureType<TInput, number>> {
356
- try {
357
- let max = 0;
358
- for await (const item of this) {
359
- if (typeof item !== "number") {
360
- throw new TypeError("Item type is invalid must be number");
361
- }
362
- if (max === 0) {
363
- max = item;
364
- } else if (max < item) {
365
- max = item;
366
- }
367
- }
368
- return max as EnsureType<TInput, number>;
369
- } catch (error: unknown) {
370
- if (
371
- error instanceof CollectionError ||
372
- error instanceof TypeError
373
- ) {
374
- throw error;
375
- }
376
- throw new UnexpectedCollectionError(
377
- `Unexpected error "${String(error)}" occured`,
378
- error,
379
- );
380
- }
381
- }
382
-
383
- async percentage(
384
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
385
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
386
- ): Promise<number> {
387
- try {
388
- if (await this.empty()) {
389
- return 0;
390
- }
391
- let part = 0,
392
- total = 0;
393
- for await (const item of this) {
394
- if (throwOnNumberLimit && total === Number.MAX_SAFE_INTEGER) {
395
- throw new IndexOverflowError(
396
- "The total amount has overflowed",
397
- );
398
- }
399
- if (await filter(item, total, this)) {
400
- part++;
401
- }
402
- total++;
403
- }
404
- return (part / total) * 100;
405
- } catch (error: unknown) {
406
- if (
407
- error instanceof CollectionError ||
408
- error instanceof TypeError
409
- ) {
410
- throw error;
411
- }
412
- throw new UnexpectedCollectionError(
413
- `Unexpected error "${String(error)}" occured`,
414
- error,
415
- );
416
- }
417
- }
418
-
419
- async some<TOutput extends TInput>(
420
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>, TOutput>,
421
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
422
- ): Promise<boolean> {
423
- try {
424
- for await (const [index, item] of this.entries(
425
- throwOnNumberLimit,
426
- )) {
427
- if (await filter(item, index, this)) {
428
- return true;
429
- }
430
- }
431
- return false;
432
- } catch (error: unknown) {
433
- if (
434
- error instanceof CollectionError ||
435
- error instanceof TypeError
436
- ) {
437
- throw error;
438
- }
439
- throw new UnexpectedCollectionError(
440
- `Unexpected error "${String(error)}" occured`,
441
- error,
442
- );
443
- }
444
- }
445
-
446
- async every<TOutput extends TInput>(
447
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>, TOutput>,
448
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
449
- ): Promise<boolean> {
450
- try {
451
- let isTrue = true;
452
- for await (const [index, item] of this.entries(
453
- throwOnNumberLimit,
454
- )) {
455
- isTrue &&= await filter(item, index, this);
456
- if (!isTrue) {
457
- break;
458
- }
459
- }
460
- return isTrue;
461
- } catch (error: unknown) {
462
- if (
463
- error instanceof CollectionError ||
464
- error instanceof TypeError
465
- ) {
466
- throw error;
467
- }
468
- throw new UnexpectedCollectionError(
469
- `Unexpected error "${String(error)}" occured`,
470
- error,
471
- );
472
- }
473
- }
474
-
475
- take(
476
- limit: number,
477
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
478
- ): IAsyncCollection<TInput> {
479
- return new AsyncIterableCollection(
480
- new AsyncTakeIterable(this, limit, throwOnNumberLimit),
481
- );
482
- }
483
-
484
- takeUntil(
485
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
486
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
487
- ): IAsyncCollection<TInput> {
488
- return new AsyncIterableCollection(
489
- new AsyncTakeUntilIterable(this, filter, throwOnNumberLimit),
490
- );
491
- }
492
-
493
- takeWhile(
494
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
495
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
496
- ): IAsyncCollection<TInput> {
497
- return this.takeUntil(
498
- async (...arguments_) => !(await filter(...arguments_)),
499
- throwOnNumberLimit,
500
- );
501
- }
502
-
503
- skip(
504
- offset: number,
505
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
506
- ): IAsyncCollection<TInput> {
507
- return new AsyncIterableCollection(
508
- new AsyncSkipIterable(this, offset, throwOnNumberLimit),
509
- );
510
- }
511
-
512
- skipUntil(
513
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
514
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
515
- ): IAsyncCollection<TInput> {
516
- return new AsyncIterableCollection(
517
- new AsyncSkipUntilIterable(this, filter, throwOnNumberLimit),
518
- );
519
- }
520
-
521
- skipWhile(
522
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
523
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
524
- ): IAsyncCollection<TInput> {
525
- return this.skipUntil(
526
- async (...arguments_) => !(await filter(...arguments_)),
527
- throwOnNumberLimit,
528
- );
529
- }
530
-
531
- when<TExtended = TInput>(
532
- condition: boolean,
533
- callback: AsyncModifier<
534
- IAsyncCollection<TInput>,
535
- IAsyncCollection<TExtended>
536
- >,
537
- ): IAsyncCollection<TInput | TExtended> {
538
- return new AsyncIterableCollection(
539
- new AsyncWhenIterable(this, () => condition, callback),
540
- );
541
- }
542
-
543
- whenEmpty<TExtended = TInput>(
544
- callback: AsyncModifier<
545
- IAsyncCollection<TInput>,
546
- IAsyncCollection<TExtended>
547
- >,
548
- ): IAsyncCollection<TInput | TExtended> {
549
- return new AsyncIterableCollection(
550
- new AsyncWhenIterable(this, () => this.empty(), callback),
551
- );
552
- }
553
-
554
- whenNot<TExtended = TInput>(
555
- condition: boolean,
556
- callback: AsyncModifier<
557
- IAsyncCollection<TInput>,
558
- IAsyncCollection<TExtended>
559
- >,
560
- ): IAsyncCollection<TInput | TExtended> {
561
- return new AsyncIterableCollection(
562
- new AsyncWhenIterable(this, () => !condition, callback),
563
- );
564
- }
565
-
566
- whenNotEmpty<TExtended = TInput>(
567
- callback: AsyncModifier<
568
- IAsyncCollection<TInput>,
569
- IAsyncCollection<TExtended>
570
- >,
571
- ): IAsyncCollection<TInput | TExtended> {
572
- return new AsyncIterableCollection(
573
- new AsyncWhenIterable(this, () => this.notEmpty(), callback),
574
- );
575
- }
576
-
577
- async pipe<TOutput = TInput>(
578
- callback: AsyncTransform<IAsyncCollection<TInput>, TOutput>,
579
- ): Promise<TOutput> {
580
- try {
581
- return await callback(this);
582
- } catch (error: unknown) {
583
- if (
584
- error instanceof CollectionError ||
585
- error instanceof TypeError
586
- ) {
587
- throw error;
588
- }
589
- throw new UnexpectedCollectionError(
590
- `Unexpected error "${String(error)}" occured`,
591
- error,
592
- );
593
- }
594
- }
595
-
596
- tap(
597
- callback: AsyncTap<IAsyncCollection<TInput>>,
598
- ): IAsyncCollection<TInput> {
599
- return new AsyncIterableCollection(
600
- new AsyncTapIterable(this, callback),
601
- );
602
- }
603
-
604
- chunk(chunkSize: number): IAsyncCollection<IAsyncCollection<TInput>> {
605
- return new AsyncIterableCollection(
606
- new AsyncChunkIterable(
607
- this,
608
- chunkSize,
609
- AsyncIterableCollection.makeCollection,
610
- ),
611
- );
612
- }
613
-
614
- chunkWhile(
615
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
616
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
617
- ): IAsyncCollection<IAsyncCollection<TInput>> {
618
- return new AsyncIterableCollection(
619
- new AsyncChunkWhileIterable(
620
- this,
621
- filter,
622
- throwOnNumberLimit,
623
- AsyncIterableCollection.makeCollection,
624
- ),
625
- );
626
- }
627
-
628
- split(
629
- chunkAmount: number,
630
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
631
- ): IAsyncCollection<IAsyncCollection<TInput>> {
632
- return new AsyncIterableCollection(
633
- new AsyncSplitIterable(
634
- this,
635
- chunkAmount,
636
- throwOnNumberLimit,
637
- AsyncIterableCollection.makeCollection,
638
- ),
639
- );
640
- }
641
-
642
- partition(
643
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
644
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
645
- ): IAsyncCollection<IAsyncCollection<TInput>> {
646
- return new AsyncIterableCollection(
647
- new AsyncPartionIterable(
648
- this,
649
- filter,
650
- throwOnNumberLimit,
651
- AsyncIterableCollection.makeCollection,
652
- ),
653
- );
654
- }
655
-
656
- sliding(
657
- settings: SlidingSettings,
658
- ): IAsyncCollection<IAsyncCollection<TInput>> {
659
- const {
660
- chunkSize,
661
- step = chunkSize - 1,
662
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
663
- } = settings;
664
- return new AsyncIterableCollection(
665
- new AsyncSlidingIteralbe(this, chunkSize, step, throwOnNumberLimit),
666
- );
667
- }
668
-
669
- groupBy<TOutput = TInput>(
670
- settings?: AsyncGroupBySettings<
671
- TInput,
672
- IAsyncCollection<TInput>,
673
- TOutput
674
- >,
675
- ): IAsyncCollection<RecordItem<TOutput, IAsyncCollection<TInput>>> {
676
- return new AsyncIterableCollection(
677
- new AsyncGroupByIterable(
678
- this,
679
- settings?.mapFn,
680
- settings?.throwOnNumberLimit ??
681
- AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
682
- AsyncIterableCollection.makeCollection,
683
- ),
684
- );
685
- }
686
-
687
- countBy<TOutput = TInput>(
688
- settings?: AsyncGroupBySettings<
689
- TInput,
690
- IAsyncCollection<TInput>,
691
- TOutput
692
- >,
693
- ): IAsyncCollection<RecordItem<TOutput, number>> {
694
- return new AsyncIterableCollection(
695
- new AsyncCountByIterable(
696
- this,
697
- settings?.mapFn,
698
- settings?.throwOnNumberLimit ??
699
- AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
700
- ),
701
- );
702
- }
703
-
704
- unique<TOutput = TInput>(
705
- settings?: AsyncGroupBySettings<
706
- TInput,
707
- IAsyncCollection<TInput>,
708
- TOutput
709
- >,
710
- ): IAsyncCollection<TInput> {
711
- return new AsyncIterableCollection(
712
- new AsyncUniqueIterable(
713
- this,
714
- settings?.mapFn,
715
- settings?.throwOnNumberLimit ??
716
- AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
717
- ),
718
- );
719
- }
720
-
721
- difference<TOutput = TInput>(
722
- iterable: AsyncIterableValue<TInput>,
723
- map: AsyncMap<TInput, IAsyncCollection<TInput>, TOutput> = (item) =>
724
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-explicit-any
725
- item as any,
726
- ): IAsyncCollection<TInput> {
727
- const differenceCollection = new AsyncIterableCollection(iterable);
728
- return this.filter(async (item, index, collection) => {
729
- return !(await differenceCollection.some(
730
- async (matchItem, matchIndex, matchCollection) => {
731
- return (
732
- (await map(item, index, collection)) ===
733
- (await map(matchItem, matchIndex, matchCollection))
734
- );
735
- },
736
- ));
737
- });
738
- }
739
-
740
- repeat(amount: number): IAsyncCollection<TInput> {
741
- return new AsyncIterableCollection(
742
- new AsyncRepeatIterable(
743
- this,
744
- amount,
745
- AsyncIterableCollection.makeCollection,
746
- ),
747
- );
748
- }
749
-
750
- padStart<TExtended = TInput>(
751
- maxLength: number,
752
- fillItems: AsyncIterableValue<TExtended>,
753
- ): IAsyncCollection<TInput | TExtended> {
754
- return new AsyncIterableCollection(
755
- new AsyncPadStartIterable(
756
- this,
757
- maxLength,
758
- fillItems,
759
- AsyncIterableCollection.makeCollection,
760
- ),
761
- );
762
- }
763
-
764
- padEnd<TExtended = TInput>(
765
- maxLength: number,
766
- fillItems: AsyncIterableValue<TExtended>,
767
- ): IAsyncCollection<TInput | TExtended> {
768
- return new AsyncIterableCollection(
769
- new AsyncPadEndIterable(
770
- this,
771
- maxLength,
772
- fillItems,
773
- AsyncIterableCollection.makeCollection,
774
- ),
775
- );
776
- }
777
-
778
- slice(settings?: SliceSettings): IAsyncCollection<TInput> {
779
- return new AsyncIterableCollection(
780
- new AsyncSliceIterable(
781
- this,
782
- settings?.start,
783
- settings?.end,
784
- settings?.throwOnNumberLimit ??
785
- AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
786
- ),
787
- );
788
- }
789
-
790
- prepend<TExtended = TInput>(
791
- iterable: AsyncIterableValue<TInput | TExtended>,
792
- ): IAsyncCollection<TInput | TExtended> {
793
- return new AsyncIterableCollection(
794
- new AsyncMergeIterable(iterable, this),
795
- );
796
- }
797
-
798
- append<TExtended = TInput>(
799
- iterable: AsyncIterableValue<TInput | TExtended>,
800
- ): IAsyncCollection<TInput | TExtended> {
801
- return new AsyncIterableCollection(
802
- new AsyncMergeIterable(this, iterable),
803
- );
804
- }
805
-
806
- insertBefore<TExtended = TInput>(
807
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
808
- iterable: AsyncIterableValue<TInput | TExtended>,
809
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
810
- ): IAsyncCollection<TInput | TExtended> {
811
- return new AsyncIterableCollection(
812
- new AsyncInsertBeforeIterable(
813
- this,
814
- filter,
815
- iterable,
816
- throwOnNumberLimit,
817
- ),
818
- );
819
- }
820
-
821
- insertAfter<TExtended = TInput>(
822
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
823
- iterable: AsyncIterableValue<TInput | TExtended>,
824
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
825
- ): IAsyncCollection<TInput | TExtended> {
826
- return new AsyncIterableCollection(
827
- new AsyncInsertAfterIterable(
828
- this,
829
- filter,
830
- iterable,
831
- throwOnNumberLimit,
832
- ),
833
- );
834
- }
835
-
836
- crossJoin<TExtended = TInput>(
837
- ...iterables: Array<AsyncIterableValue<TExtended>>
838
- ): IAsyncCollection<IAsyncCollection<TInput | TExtended>> {
839
- return new AsyncIterableCollection(
840
- new AsyncCrossJoinIterable(
841
- this as IAsyncCollection<TInput>,
842
- iterables,
843
- AsyncIterableCollection.makeCollection,
844
- ),
845
- );
846
- }
847
-
848
- zip<TExtended>(
849
- iterable: AsyncIterableValue<TExtended>,
850
- ): IAsyncCollection<RecordItem<TInput, TExtended>> {
851
- return new AsyncIterableCollection(
852
- new AsyncZipIterable(this, iterable),
853
- );
854
- }
855
-
856
- sort(compare?: Comparator<TInput> | undefined): IAsyncCollection<TInput> {
857
- return new AsyncIterableCollection(
858
- new AsyncSortIterable(this, compare),
859
- );
860
- }
861
-
862
- reverse(settings?: ReverseSettings): IAsyncCollection<TInput> {
863
- return new AsyncIterableCollection(
864
- new AsyncReverseIterable(
865
- this,
866
- settings?.chunkSize ??
867
- AsyncIterableCollection.DEFAULT_CHUNK_SIZE,
868
- settings?.throwOnNumberLimit ??
869
- AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
870
- AsyncIterableCollection.makeCollection,
871
- ),
872
- );
873
- }
874
-
875
- shuffle(): IAsyncCollection<TInput> {
876
- return new AsyncIterableCollection(new AsyncShuffleIterable(this));
877
- }
878
-
879
- async first<TOutput extends TInput>(
880
- settings?: AsyncFindSettings<TInput, IAsyncCollection<TInput>, TOutput>,
881
- ): Promise<TOutput | null> {
882
- return this.firstOr({
883
- ...settings,
884
- defaultValue: null,
885
- });
886
- }
887
-
888
- async firstOr<TOutput extends TInput, TExtended = TInput>(
889
- settings: AsyncFindOrSettings<
890
- TInput,
891
- IAsyncCollection<TInput>,
892
- TOutput,
893
- TExtended
894
- >,
895
- ): Promise<TOutput | TExtended> {
896
- try {
897
- const throwOnNumberLimit =
898
- settings.throwOnNumberLimit ??
899
- AsyncIterableCollection.THROW_ON_NUMBER_LIMIT;
900
-
901
- const filter = settings.filterFn ?? (() => true);
902
- for await (const [index, item] of this.entries(
903
- throwOnNumberLimit,
904
- )) {
905
- if (await filter(item, index, this)) {
906
- return item as TOutput;
907
- }
908
- }
909
- if (typeof settings.defaultValue === "function") {
910
- const defaultFn = settings.defaultValue as () => TOutput;
911
- return defaultFn();
912
- }
913
- return settings.defaultValue;
914
- } catch (error: unknown) {
915
- if (
916
- error instanceof CollectionError ||
917
- error instanceof TypeError
918
- ) {
919
- throw error;
920
- }
921
- throw new UnexpectedCollectionError(
922
- `Unexpected error "${String(error)}" occured`,
923
- error,
924
- );
925
- }
926
- }
927
-
928
- async firstOrFail<TOutput extends TInput>(
929
- settings?: AsyncFindSettings<TInput, IAsyncCollection<TInput>, TOutput>,
930
- ): Promise<TOutput> {
931
- const item = await this.first(settings);
932
- if (item === null) {
933
- throw new ItemNotFoundError("Item was not found");
934
- }
935
- return item;
936
- }
937
-
938
- async last<TOutput extends TInput>(
939
- settings?: AsyncFindSettings<TInput, IAsyncCollection<TInput>, TOutput>,
940
- ): Promise<TOutput | null> {
941
- return this.lastOr({
942
- ...settings,
943
- defaultValue: null,
944
- });
945
- }
946
-
947
- async lastOr<TOutput extends TInput, TExtended = TInput>(
948
- settings: AsyncFindOrSettings<
949
- TInput,
950
- IAsyncCollection<TInput>,
951
- TOutput,
952
- TExtended
953
- >,
954
- ): Promise<TOutput | TExtended> {
955
- try {
956
- const throwOnNumberLimit =
957
- settings.throwOnNumberLimit ??
958
- AsyncIterableCollection.THROW_ON_NUMBER_LIMIT;
959
-
960
- const filter = settings.filterFn ?? (() => true);
961
- let matchedItem: TOutput | null = null;
962
- for await (const [index, item] of this.entries(
963
- throwOnNumberLimit,
964
- )) {
965
- if (await filter(item, index, this)) {
966
- matchedItem = item as TOutput;
967
- }
968
- }
969
- if (matchedItem) {
970
- return matchedItem;
971
- }
972
- if (typeof settings.defaultValue === "function") {
973
- const defaultFn = settings.defaultValue as () => TOutput;
974
- return defaultFn();
975
- }
976
- return settings.defaultValue;
977
- } catch (error: unknown) {
978
- if (
979
- error instanceof CollectionError ||
980
- error instanceof TypeError
981
- ) {
982
- throw error;
983
- }
984
- throw new UnexpectedCollectionError(
985
- `Unexpected error "${String(error)}" occured`,
986
- error,
987
- );
988
- }
989
- }
990
-
991
- async lastOrFail<TOutput extends TInput>(
992
- settings?: AsyncFindSettings<TInput, IAsyncCollection<TInput>, TOutput>,
993
- ): Promise<TOutput> {
994
- const item = await this.last(settings);
995
- if (item === null) {
996
- throw new ItemNotFoundError("Item was not found");
997
- }
998
- return item;
999
- }
1000
-
1001
- async before(
1002
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
1003
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
1004
- ): Promise<TInput | null> {
1005
- return this.beforeOr(null, filter, throwOnNumberLimit);
1006
- }
1007
-
1008
- async beforeOr<TExtended = TInput>(
1009
- defaultValue: AsyncLazyable<TExtended>,
1010
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
1011
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
1012
- ): Promise<TInput | TExtended> {
1013
- try {
1014
- let beforeItem: TInput | null = null,
1015
- index = 0;
1016
- for await (const item of this) {
1017
- if (throwOnNumberLimit && index === Number.MAX_SAFE_INTEGER) {
1018
- throw new IndexOverflowError("Index has overflowed");
1019
- }
1020
- if ((await filter(item, index, this)) && beforeItem) {
1021
- return beforeItem;
1022
- }
1023
- index++;
1024
- beforeItem = item;
1025
- }
1026
- if (typeof defaultValue === "function") {
1027
- const defaultFn = defaultValue as () => TExtended;
1028
- return defaultFn();
1029
- }
1030
- return defaultValue;
1031
- } catch (error: unknown) {
1032
- if (
1033
- error instanceof CollectionError ||
1034
- error instanceof TypeError
1035
- ) {
1036
- throw error;
1037
- }
1038
- throw new UnexpectedCollectionError(
1039
- `Unexpected error "${String(error)}" occured`,
1040
- error,
1041
- );
1042
- }
1043
- }
1044
-
1045
- async beforeOrFail(
1046
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
1047
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
1048
- ): Promise<TInput> {
1049
- const item = await this.before(filter, throwOnNumberLimit);
1050
- if (item === null) {
1051
- throw new ItemNotFoundError("Item was not found");
1052
- }
1053
- return item;
1054
- }
1055
-
1056
- async after(
1057
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
1058
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
1059
- ): Promise<TInput | null> {
1060
- return this.afterOr(null, filter, throwOnNumberLimit);
1061
- }
1062
-
1063
- async afterOr<TExtended = TInput>(
1064
- defaultValue: AsyncLazyable<TExtended>,
1065
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
1066
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
1067
- ): Promise<TInput | TExtended> {
1068
- try {
1069
- let hasMatched = false,
1070
- index = 0;
1071
- for await (const item of this) {
1072
- if (hasMatched) {
1073
- return item;
1074
- }
1075
- if (throwOnNumberLimit && index === Number.MAX_SAFE_INTEGER) {
1076
- throw new IndexOverflowError("Index has overflowed");
1077
- }
1078
- hasMatched = await filter(item, index, this);
1079
- index++;
1080
- }
1081
- if (typeof defaultValue === "function") {
1082
- const defaultFn = defaultValue as () => TExtended;
1083
- return defaultFn();
1084
- }
1085
- return defaultValue;
1086
- } catch (error: unknown) {
1087
- if (error instanceof CollectionError) {
1088
- throw error;
1089
- }
1090
- throw new UnexpectedCollectionError("!!__messge__!!", error);
1091
- }
1092
- }
1093
-
1094
- async afterOrFail(
1095
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
1096
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
1097
- ): Promise<TInput> {
1098
- const item = await this.after(filter, throwOnNumberLimit);
1099
- if (item === null) {
1100
- throw new ItemNotFoundError("Item was not found");
1101
- }
1102
- return item;
1103
- }
1104
-
1105
- async sole<TOutput extends TInput>(
1106
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>, TOutput>,
1107
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
1108
- ): Promise<TOutput> {
1109
- try {
1110
- let matchedItem: TOutput | null = null;
1111
- for await (const [index, item] of this.entries(
1112
- throwOnNumberLimit,
1113
- )) {
1114
- if (await filter(item, index, this)) {
1115
- if (matchedItem !== null) {
1116
- throw new MultipleItemsFoundError(
1117
- "Multiple items were found",
1118
- );
1119
- }
1120
- matchedItem = item as TOutput;
1121
- }
1122
- }
1123
- if (matchedItem === null) {
1124
- throw new ItemNotFoundError("Item was not found");
1125
- }
1126
- return matchedItem;
1127
- } catch (error: unknown) {
1128
- if (
1129
- error instanceof CollectionError ||
1130
- error instanceof TypeError
1131
- ) {
1132
- throw error;
1133
- }
1134
- throw new UnexpectedCollectionError(
1135
- `Unexpected error "${String(error)}" occured`,
1136
- error,
1137
- );
1138
- }
1139
- }
1140
-
1141
- nth(step: number): IAsyncCollection<TInput> {
1142
- return this.filter((_item, index) => index % step === 0);
1143
- }
1144
-
1145
- delay(timeInMs: number): IAsyncCollection<TInput> {
1146
- return new AsyncIterableCollection(
1147
- new AsyncDelayIterable(this, timeInMs),
1148
- );
1149
- }
1150
-
1151
- abort(signal: AbortSignal): IAsyncCollection<TInput> {
1152
- return new AsyncIterableCollection(
1153
- new AsyncAbortIterable(this, signal),
1154
- );
1155
- }
1156
-
1157
- timeout(timeInMs: number): IAsyncCollection<TInput> {
1158
- return new AsyncIterableCollection(
1159
- new AsyncTimeoutIterable(this, timeInMs),
1160
- );
1161
- }
1162
-
1163
- async count(
1164
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
1165
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
1166
- ): Promise<number> {
1167
- try {
1168
- let size = 0;
1169
- for await (const item of this) {
1170
- if (throwOnNumberLimit && size === Number.MAX_SAFE_INTEGER) {
1171
- throw new IndexOverflowError("Size has overflowed");
1172
- }
1173
- if (await filter(item, size, this)) {
1174
- size++;
1175
- }
1176
- }
1177
- return size;
1178
- } catch (error: unknown) {
1179
- if (
1180
- error instanceof CollectionError ||
1181
- error instanceof TypeError
1182
- ) {
1183
- throw error;
1184
- }
1185
- throw new UnexpectedCollectionError(
1186
- `Unexpected error "${String(error)}" occured`,
1187
- error,
1188
- );
1189
- }
1190
- }
1191
-
1192
- async size(throwOnNumberLimit?: boolean): Promise<number> {
1193
- return this.count(() => true, throwOnNumberLimit);
1194
- }
1195
-
1196
- async empty(): Promise<boolean> {
1197
- try {
1198
- for await (const _ of this) {
1199
- return false;
1200
- }
1201
- return true;
1202
- } catch (error: unknown) {
1203
- if (
1204
- error instanceof CollectionError ||
1205
- error instanceof TypeError
1206
- ) {
1207
- throw error;
1208
- }
1209
- throw new UnexpectedCollectionError(
1210
- `Unexpected error "${String(error)}" occured`,
1211
- error,
1212
- );
1213
- }
1214
- }
1215
-
1216
- async notEmpty(): Promise<boolean> {
1217
- return !(await this.empty());
1218
- }
1219
-
1220
- async search(
1221
- filter: AsyncFilter<TInput, IAsyncCollection<TInput>>,
1222
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
1223
- ): Promise<number> {
1224
- try {
1225
- for await (const [index, item] of this.entries(
1226
- throwOnNumberLimit,
1227
- )) {
1228
- if (await filter(item, index, this)) {
1229
- return index;
1230
- }
1231
- }
1232
- return -1;
1233
- } catch (error: unknown) {
1234
- if (
1235
- error instanceof CollectionError ||
1236
- error instanceof TypeError
1237
- ) {
1238
- throw error;
1239
- }
1240
- throw new UnexpectedCollectionError(
1241
- `Unexpected error "${String(error)}" occured`,
1242
- error,
1243
- );
1244
- }
1245
- }
1246
-
1247
- async forEach(
1248
- callback: AsyncForEach<TInput, IAsyncCollection<TInput>>,
1249
- throwOnNumberLimit = AsyncIterableCollection.THROW_ON_NUMBER_LIMIT,
1250
- ): Promise<void> {
1251
- for await (const [index, item] of this.entries(throwOnNumberLimit)) {
1252
- await callback(item, index, this);
1253
- }
1254
- }
1255
-
1256
- async toArray(): Promise<TInput[]> {
1257
- try {
1258
- const items: TInput[] = [];
1259
- for await (const item of this) {
1260
- items.push(item);
1261
- }
1262
- return items;
1263
- } catch (error: unknown) {
1264
- if (
1265
- error instanceof CollectionError ||
1266
- error instanceof TypeError
1267
- ) {
1268
- throw error;
1269
- }
1270
- throw new UnexpectedCollectionError(
1271
- `Unexpected error "${String(error)}" occured`,
1272
- error,
1273
- );
1274
- }
1275
- }
1276
- }