@daiso-tech/core 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (439) hide show
  1. package/dist/cjs/_module.js +2 -0
  2. package/dist/cjs/_module.js.map +1 -1
  3. package/dist/cjs/async/_module.js +30 -0
  4. package/dist/cjs/async/_module.js.map +1 -0
  5. package/dist/cjs/async/_shared.js +34 -0
  6. package/dist/cjs/async/_shared.js.map +1 -0
  7. package/dist/cjs/async/abortable/_module.js +18 -0
  8. package/dist/cjs/async/abortable/_module.js.map +1 -0
  9. package/dist/cjs/async/abortable/abortable.js +48 -0
  10. package/dist/cjs/async/abortable/abortable.js.map +1 -0
  11. package/dist/cjs/async/abortable-iterable/_module.js +18 -0
  12. package/dist/cjs/async/abortable-iterable/_module.js.map +1 -0
  13. package/dist/cjs/async/abortable-iterable/abortable-iterable.js +32 -0
  14. package/dist/cjs/async/abortable-iterable/abortable-iterable.js.map +1 -0
  15. package/dist/cjs/async/backof-policies/_module.js +21 -0
  16. package/dist/cjs/async/backof-policies/_module.js.map +1 -0
  17. package/dist/cjs/async/backof-policies/_shared.js +7 -0
  18. package/dist/cjs/async/backof-policies/_shared.js.map +1 -0
  19. package/dist/cjs/async/backof-policies/constant-backoff-policy/_module.js +18 -0
  20. package/dist/cjs/async/backof-policies/constant-backoff-policy/_module.js.map +1 -0
  21. package/dist/cjs/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js +19 -0
  22. package/dist/cjs/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +1 -0
  23. package/dist/cjs/async/backof-policies/exponential-backoff-policy/_module.js +18 -0
  24. package/dist/cjs/async/backof-policies/exponential-backoff-policy/_module.js.map +1 -0
  25. package/dist/cjs/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js +23 -0
  26. package/dist/cjs/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +1 -0
  27. package/dist/cjs/async/backof-policies/linear-backoff-policy/_module.js +18 -0
  28. package/dist/cjs/async/backof-policies/linear-backoff-policy/_module.js.map +1 -0
  29. package/dist/cjs/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js +23 -0
  30. package/dist/cjs/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +1 -0
  31. package/dist/cjs/async/backof-policies/polynomial-backoff-policy/_module.js +18 -0
  32. package/dist/cjs/async/backof-policies/polynomial-backoff-policy/_module.js.map +1 -0
  33. package/dist/cjs/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js +23 -0
  34. package/dist/cjs/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +1 -0
  35. package/dist/cjs/async/delay/_module.js +18 -0
  36. package/dist/cjs/async/delay/_module.js.map +1 -0
  37. package/dist/cjs/async/delay/delay.js +24 -0
  38. package/dist/cjs/async/delay/delay.js.map +1 -0
  39. package/dist/cjs/async/delay-iterable/_module.js +18 -0
  40. package/dist/cjs/async/delay-iterable/_module.js.map +1 -0
  41. package/dist/cjs/async/delay-iterable/delay-iterable.js +36 -0
  42. package/dist/cjs/async/delay-iterable/delay-iterable.js.map +1 -0
  43. package/dist/cjs/async/lazy-promise/_module.js +18 -0
  44. package/dist/cjs/async/lazy-promise/_module.js.map +1 -0
  45. package/dist/cjs/async/lazy-promise/lazy-promise.js +22 -0
  46. package/dist/cjs/async/lazy-promise/lazy-promise.js.map +1 -0
  47. package/dist/cjs/async/retry/_module.js +18 -0
  48. package/dist/cjs/async/retry/_module.js.map +1 -0
  49. package/dist/cjs/async/retry/retry.js +43 -0
  50. package/dist/cjs/async/retry/retry.js.map +1 -0
  51. package/dist/cjs/async/retry-iterable/_module.js +18 -0
  52. package/dist/cjs/async/retry-iterable/_module.js.map +1 -0
  53. package/dist/cjs/async/retry-iterable/retry-iterable.js +32 -0
  54. package/dist/cjs/async/retry-iterable/retry-iterable.js.map +1 -0
  55. package/dist/cjs/async/timeout/_module.js +18 -0
  56. package/dist/cjs/async/timeout/_module.js.map +1 -0
  57. package/dist/cjs/async/timeout/timeout.js +28 -0
  58. package/dist/cjs/async/timeout/timeout.js.map +1 -0
  59. package/dist/cjs/async/timeout-iterable/_module.js +18 -0
  60. package/dist/cjs/async/timeout-iterable/_module.js.map +1 -0
  61. package/dist/cjs/async/timeout-iterable/timeout-iterable.js +11 -0
  62. package/dist/cjs/async/timeout-iterable/timeout-iterable.js.map +1 -0
  63. package/dist/cjs/collection/async-iterable-collection/_shared/_module.js +1 -3
  64. package/dist/cjs/collection/async-iterable-collection/_shared/_module.js.map +1 -1
  65. package/dist/cjs/collection/async-iterable-collection/_shared/async-chunk-iterable.js +14 -23
  66. package/dist/cjs/collection/async-iterable-collection/_shared/async-chunk-iterable.js.map +1 -1
  67. package/dist/cjs/collection/async-iterable-collection/_shared/async-chunk-while-iterable.js +12 -21
  68. package/dist/cjs/collection/async-iterable-collection/_shared/async-chunk-while-iterable.js.map +1 -1
  69. package/dist/cjs/collection/async-iterable-collection/_shared/async-collapse-iterable.js +5 -14
  70. package/dist/cjs/collection/async-iterable-collection/_shared/async-collapse-iterable.js.map +1 -1
  71. package/dist/cjs/collection/async-iterable-collection/_shared/async-count-by-iterable.js +9 -18
  72. package/dist/cjs/collection/async-iterable-collection/_shared/async-count-by-iterable.js.map +1 -1
  73. package/dist/cjs/collection/async-iterable-collection/_shared/async-cross-join-iterable.js +18 -27
  74. package/dist/cjs/collection/async-iterable-collection/_shared/async-cross-join-iterable.js.map +1 -1
  75. package/dist/cjs/collection/async-iterable-collection/_shared/async-error-handler-iterable.js +31 -0
  76. package/dist/cjs/collection/async-iterable-collection/_shared/async-error-handler-iterable.js.map +1 -0
  77. package/dist/cjs/collection/async-iterable-collection/_shared/async-filter-iterable.js +3 -12
  78. package/dist/cjs/collection/async-iterable-collection/_shared/async-filter-iterable.js.map +1 -1
  79. package/dist/cjs/collection/async-iterable-collection/_shared/async-flat-map-iterable.js +2 -11
  80. package/dist/cjs/collection/async-iterable-collection/_shared/async-flat-map-iterable.js.map +1 -1
  81. package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-after-iterable.js +8 -17
  82. package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-after-iterable.js.map +1 -1
  83. package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-before-iterable.js +8 -17
  84. package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-before-iterable.js.map +1 -1
  85. package/dist/cjs/collection/async-iterable-collection/_shared/async-map-iterable.js +2 -11
  86. package/dist/cjs/collection/async-iterable-collection/_shared/async-map-iterable.js.map +1 -1
  87. package/dist/cjs/collection/async-iterable-collection/_shared/async-merge-iterable.js +2 -11
  88. package/dist/cjs/collection/async-iterable-collection/_shared/async-merge-iterable.js.map +1 -1
  89. package/dist/cjs/collection/async-iterable-collection/_shared/async-partion-iterable.js +9 -18
  90. package/dist/cjs/collection/async-iterable-collection/_shared/async-partion-iterable.js.map +1 -1
  91. package/dist/cjs/collection/async-iterable-collection/_shared/async-repeat-iterable.js +4 -13
  92. package/dist/cjs/collection/async-iterable-collection/_shared/async-repeat-iterable.js.map +1 -1
  93. package/dist/cjs/collection/async-iterable-collection/_shared/async-skip-iterable.js +3 -12
  94. package/dist/cjs/collection/async-iterable-collection/_shared/async-skip-iterable.js.map +1 -1
  95. package/dist/cjs/collection/async-iterable-collection/_shared/async-skip-until-iterable.js +7 -16
  96. package/dist/cjs/collection/async-iterable-collection/_shared/async-skip-until-iterable.js.map +1 -1
  97. package/dist/cjs/collection/async-iterable-collection/_shared/async-sliding-iterable.js +9 -18
  98. package/dist/cjs/collection/async-iterable-collection/_shared/async-sliding-iterable.js.map +1 -1
  99. package/dist/cjs/collection/async-iterable-collection/_shared/async-split-iterable.js +17 -26
  100. package/dist/cjs/collection/async-iterable-collection/_shared/async-split-iterable.js.map +1 -1
  101. package/dist/cjs/collection/async-iterable-collection/_shared/async-take-iterable.js +3 -12
  102. package/dist/cjs/collection/async-iterable-collection/_shared/async-take-iterable.js.map +1 -1
  103. package/dist/cjs/collection/async-iterable-collection/_shared/async-take-until-iterable.js +4 -13
  104. package/dist/cjs/collection/async-iterable-collection/_shared/async-take-until-iterable.js.map +1 -1
  105. package/dist/cjs/collection/async-iterable-collection/_shared/async-tap-iterable.js +2 -11
  106. package/dist/cjs/collection/async-iterable-collection/_shared/async-tap-iterable.js.map +1 -1
  107. package/dist/cjs/collection/async-iterable-collection/_shared/async-unique-iterable.js +6 -15
  108. package/dist/cjs/collection/async-iterable-collection/_shared/async-unique-iterable.js.map +1 -1
  109. package/dist/cjs/collection/async-iterable-collection/_shared/async-update-iterable.js +5 -14
  110. package/dist/cjs/collection/async-iterable-collection/_shared/async-update-iterable.js.map +1 -1
  111. package/dist/cjs/collection/async-iterable-collection/_shared/async-when-iterable.js +4 -13
  112. package/dist/cjs/collection/async-iterable-collection/_shared/async-when-iterable.js.map +1 -1
  113. package/dist/cjs/collection/async-iterable-collection/async-iterable-collection.js +177 -265
  114. package/dist/cjs/collection/async-iterable-collection/async-iterable-collection.js.map +1 -1
  115. package/dist/cjs/collection/iterable-collection/_shared/chunk-iterable.js +14 -23
  116. package/dist/cjs/collection/iterable-collection/_shared/chunk-iterable.js.map +1 -1
  117. package/dist/cjs/collection/iterable-collection/_shared/chunk-while-iterable.js +12 -21
  118. package/dist/cjs/collection/iterable-collection/_shared/chunk-while-iterable.js.map +1 -1
  119. package/dist/cjs/collection/iterable-collection/_shared/collapse-iterable.js +5 -14
  120. package/dist/cjs/collection/iterable-collection/_shared/collapse-iterable.js.map +1 -1
  121. package/dist/cjs/collection/iterable-collection/_shared/count-by-iterable.js +9 -18
  122. package/dist/cjs/collection/iterable-collection/_shared/count-by-iterable.js.map +1 -1
  123. package/dist/cjs/collection/iterable-collection/_shared/cross-join-iterable.js +19 -31
  124. package/dist/cjs/collection/iterable-collection/_shared/cross-join-iterable.js.map +1 -1
  125. package/dist/cjs/collection/iterable-collection/_shared/entries-iterable.js +4 -13
  126. package/dist/cjs/collection/iterable-collection/_shared/entries-iterable.js.map +1 -1
  127. package/dist/cjs/collection/iterable-collection/_shared/filter-iterable.js +3 -12
  128. package/dist/cjs/collection/iterable-collection/_shared/filter-iterable.js.map +1 -1
  129. package/dist/cjs/collection/iterable-collection/_shared/flat-map-iterable.js +2 -11
  130. package/dist/cjs/collection/iterable-collection/_shared/flat-map-iterable.js.map +1 -1
  131. package/dist/cjs/collection/iterable-collection/_shared/group-by-iterable.js +9 -18
  132. package/dist/cjs/collection/iterable-collection/_shared/group-by-iterable.js.map +1 -1
  133. package/dist/cjs/collection/iterable-collection/_shared/insert-after-iterable.js +6 -16
  134. package/dist/cjs/collection/iterable-collection/_shared/insert-after-iterable.js.map +1 -1
  135. package/dist/cjs/collection/iterable-collection/_shared/insert-before-iterable.js +6 -16
  136. package/dist/cjs/collection/iterable-collection/_shared/insert-before-iterable.js.map +1 -1
  137. package/dist/cjs/collection/iterable-collection/_shared/map-iterable.js +2 -11
  138. package/dist/cjs/collection/iterable-collection/_shared/map-iterable.js.map +1 -1
  139. package/dist/cjs/collection/iterable-collection/_shared/merge-iterable.js +2 -11
  140. package/dist/cjs/collection/iterable-collection/_shared/merge-iterable.js.map +1 -1
  141. package/dist/cjs/collection/iterable-collection/_shared/pad-end-iterable.js +11 -20
  142. package/dist/cjs/collection/iterable-collection/_shared/pad-end-iterable.js.map +1 -1
  143. package/dist/cjs/collection/iterable-collection/_shared/pad-start-iterable.js +11 -20
  144. package/dist/cjs/collection/iterable-collection/_shared/pad-start-iterable.js.map +1 -1
  145. package/dist/cjs/collection/iterable-collection/_shared/partion-iterable.js +9 -18
  146. package/dist/cjs/collection/iterable-collection/_shared/partion-iterable.js.map +1 -1
  147. package/dist/cjs/collection/iterable-collection/_shared/repeat-iterable.js +4 -13
  148. package/dist/cjs/collection/iterable-collection/_shared/repeat-iterable.js.map +1 -1
  149. package/dist/cjs/collection/iterable-collection/_shared/reverse-iterable.js +4 -13
  150. package/dist/cjs/collection/iterable-collection/_shared/reverse-iterable.js.map +1 -1
  151. package/dist/cjs/collection/iterable-collection/_shared/shuffle-iterable.js +9 -18
  152. package/dist/cjs/collection/iterable-collection/_shared/shuffle-iterable.js.map +1 -1
  153. package/dist/cjs/collection/iterable-collection/_shared/skip-iterable.js +3 -12
  154. package/dist/cjs/collection/iterable-collection/_shared/skip-iterable.js.map +1 -1
  155. package/dist/cjs/collection/iterable-collection/_shared/skip-until-iterable.js +6 -15
  156. package/dist/cjs/collection/iterable-collection/_shared/skip-until-iterable.js.map +1 -1
  157. package/dist/cjs/collection/iterable-collection/_shared/slice-iterable.js +15 -24
  158. package/dist/cjs/collection/iterable-collection/_shared/slice-iterable.js.map +1 -1
  159. package/dist/cjs/collection/iterable-collection/_shared/sliding-iterable.js +9 -18
  160. package/dist/cjs/collection/iterable-collection/_shared/sliding-iterable.js.map +1 -1
  161. package/dist/cjs/collection/iterable-collection/_shared/sort-iterable.js +1 -10
  162. package/dist/cjs/collection/iterable-collection/_shared/sort-iterable.js.map +1 -1
  163. package/dist/cjs/collection/iterable-collection/_shared/split-iterable.js +17 -26
  164. package/dist/cjs/collection/iterable-collection/_shared/split-iterable.js.map +1 -1
  165. package/dist/cjs/collection/iterable-collection/_shared/take-iterable.js +3 -12
  166. package/dist/cjs/collection/iterable-collection/_shared/take-iterable.js.map +1 -1
  167. package/dist/cjs/collection/iterable-collection/_shared/take-until-iterable.js +4 -13
  168. package/dist/cjs/collection/iterable-collection/_shared/take-until-iterable.js.map +1 -1
  169. package/dist/cjs/collection/iterable-collection/_shared/tap-iterable.js +2 -11
  170. package/dist/cjs/collection/iterable-collection/_shared/tap-iterable.js.map +1 -1
  171. package/dist/cjs/collection/iterable-collection/_shared/unique-iterable.js +6 -15
  172. package/dist/cjs/collection/iterable-collection/_shared/unique-iterable.js.map +1 -1
  173. package/dist/cjs/collection/iterable-collection/_shared/update-iterable.js +5 -14
  174. package/dist/cjs/collection/iterable-collection/_shared/update-iterable.js.map +1 -1
  175. package/dist/cjs/collection/iterable-collection/_shared/when-iterable.js +4 -13
  176. package/dist/cjs/collection/iterable-collection/_shared/when-iterable.js.map +1 -1
  177. package/dist/cjs/collection/iterable-collection/_shared/zip-iterable.js +6 -15
  178. package/dist/cjs/collection/iterable-collection/_shared/zip-iterable.js.map +1 -1
  179. package/dist/cjs/collection/iterable-collection/iterable-collection.js +154 -346
  180. package/dist/cjs/collection/iterable-collection/iterable-collection.js.map +1 -1
  181. package/dist/cjs/collection/list-collection/list-collection.js +348 -931
  182. package/dist/cjs/collection/list-collection/list-collection.js.map +1 -1
  183. package/dist/cjs/storage/storage.js +25 -15
  184. package/dist/cjs/storage/storage.js.map +1 -1
  185. package/dist/cjs/utilities/_module.js +18 -0
  186. package/dist/cjs/utilities/_module.js.map +1 -0
  187. package/dist/cjs/utilities/time-span/_module.js +18 -0
  188. package/dist/cjs/utilities/time-span/_module.js.map +1 -0
  189. package/dist/cjs/utilities/time-span/time-span.js +103 -0
  190. package/dist/cjs/utilities/time-span/time-span.js.map +1 -0
  191. package/dist/esm/_module.js +2 -0
  192. package/dist/esm/_module.js.map +1 -1
  193. package/dist/esm/async/_module.js +12 -0
  194. package/dist/esm/async/_module.js.map +1 -0
  195. package/dist/esm/async/_shared.js +27 -0
  196. package/dist/esm/async/_shared.js.map +1 -0
  197. package/dist/esm/async/abortable/_module.js +2 -0
  198. package/dist/esm/async/abortable/_module.js.map +1 -0
  199. package/dist/esm/async/abortable/abortable.js +45 -0
  200. package/dist/esm/async/abortable/abortable.js.map +1 -0
  201. package/dist/esm/async/abortable-iterable/_module.js +2 -0
  202. package/dist/esm/async/abortable-iterable/_module.js.map +1 -0
  203. package/dist/esm/async/abortable-iterable/abortable-iterable.js +29 -0
  204. package/dist/esm/async/abortable-iterable/abortable-iterable.js.map +1 -0
  205. package/dist/esm/async/backof-policies/_module.js +5 -0
  206. package/dist/esm/async/backof-policies/_module.js.map +1 -0
  207. package/dist/esm/async/backof-policies/_shared.js +4 -0
  208. package/dist/esm/async/backof-policies/_shared.js.map +1 -0
  209. package/dist/esm/async/backof-policies/constant-backoff-policy/_module.js +2 -0
  210. package/dist/esm/async/backof-policies/constant-backoff-policy/_module.js.map +1 -0
  211. package/dist/esm/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js +16 -0
  212. package/dist/esm/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +1 -0
  213. package/dist/esm/async/backof-policies/exponential-backoff-policy/_module.js +2 -0
  214. package/dist/esm/async/backof-policies/exponential-backoff-policy/_module.js.map +1 -0
  215. package/dist/esm/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js +20 -0
  216. package/dist/esm/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +1 -0
  217. package/dist/esm/async/backof-policies/linear-backoff-policy/_module.js +2 -0
  218. package/dist/esm/async/backof-policies/linear-backoff-policy/_module.js.map +1 -0
  219. package/dist/esm/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js +20 -0
  220. package/dist/esm/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +1 -0
  221. package/dist/esm/async/backof-policies/polynomial-backoff-policy/_module.js +2 -0
  222. package/dist/esm/async/backof-policies/polynomial-backoff-policy/_module.js.map +1 -0
  223. package/dist/esm/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js +20 -0
  224. package/dist/esm/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +1 -0
  225. package/dist/esm/async/delay/_module.js +2 -0
  226. package/dist/esm/async/delay/_module.js.map +1 -0
  227. package/dist/esm/async/delay/delay.js +21 -0
  228. package/dist/esm/async/delay/delay.js.map +1 -0
  229. package/dist/esm/async/delay-iterable/_module.js +2 -0
  230. package/dist/esm/async/delay-iterable/_module.js.map +1 -0
  231. package/dist/esm/async/delay-iterable/delay-iterable.js +33 -0
  232. package/dist/esm/async/delay-iterable/delay-iterable.js.map +1 -0
  233. package/dist/esm/async/lazy-promise/_module.js +2 -0
  234. package/dist/esm/async/lazy-promise/_module.js.map +1 -0
  235. package/dist/esm/async/lazy-promise/lazy-promise.js +17 -0
  236. package/dist/esm/async/lazy-promise/lazy-promise.js.map +1 -0
  237. package/dist/esm/async/retry/_module.js +2 -0
  238. package/dist/esm/async/retry/_module.js.map +1 -0
  239. package/dist/esm/async/retry/retry.js +40 -0
  240. package/dist/esm/async/retry/retry.js.map +1 -0
  241. package/dist/esm/async/retry-iterable/_module.js +2 -0
  242. package/dist/esm/async/retry-iterable/_module.js.map +1 -0
  243. package/dist/esm/async/retry-iterable/retry-iterable.js +29 -0
  244. package/dist/esm/async/retry-iterable/retry-iterable.js.map +1 -0
  245. package/dist/esm/async/timeout/_module.js +2 -0
  246. package/dist/esm/async/timeout/_module.js.map +1 -0
  247. package/dist/esm/async/timeout/timeout.js +25 -0
  248. package/dist/esm/async/timeout/timeout.js.map +1 -0
  249. package/dist/esm/async/timeout-iterable/_module.js +2 -0
  250. package/dist/esm/async/timeout-iterable/_module.js.map +1 -0
  251. package/dist/esm/async/timeout-iterable/timeout-iterable.js +8 -0
  252. package/dist/esm/async/timeout-iterable/timeout-iterable.js.map +1 -0
  253. package/dist/esm/collection/async-iterable-collection/_shared/_module.js +1 -3
  254. package/dist/esm/collection/async-iterable-collection/_shared/_module.js.map +1 -1
  255. package/dist/esm/collection/async-iterable-collection/_shared/async-chunk-iterable.js +14 -23
  256. package/dist/esm/collection/async-iterable-collection/_shared/async-chunk-iterable.js.map +1 -1
  257. package/dist/esm/collection/async-iterable-collection/_shared/async-chunk-while-iterable.js +12 -21
  258. package/dist/esm/collection/async-iterable-collection/_shared/async-chunk-while-iterable.js.map +1 -1
  259. package/dist/esm/collection/async-iterable-collection/_shared/async-collapse-iterable.js +5 -14
  260. package/dist/esm/collection/async-iterable-collection/_shared/async-collapse-iterable.js.map +1 -1
  261. package/dist/esm/collection/async-iterable-collection/_shared/async-count-by-iterable.js +9 -18
  262. package/dist/esm/collection/async-iterable-collection/_shared/async-count-by-iterable.js.map +1 -1
  263. package/dist/esm/collection/async-iterable-collection/_shared/async-cross-join-iterable.js +17 -26
  264. package/dist/esm/collection/async-iterable-collection/_shared/async-cross-join-iterable.js.map +1 -1
  265. package/dist/esm/collection/async-iterable-collection/_shared/async-error-handler-iterable.js +27 -0
  266. package/dist/esm/collection/async-iterable-collection/_shared/async-error-handler-iterable.js.map +1 -0
  267. package/dist/esm/collection/async-iterable-collection/_shared/async-filter-iterable.js +3 -12
  268. package/dist/esm/collection/async-iterable-collection/_shared/async-filter-iterable.js.map +1 -1
  269. package/dist/esm/collection/async-iterable-collection/_shared/async-flat-map-iterable.js +2 -11
  270. package/dist/esm/collection/async-iterable-collection/_shared/async-flat-map-iterable.js.map +1 -1
  271. package/dist/esm/collection/async-iterable-collection/_shared/async-insert-after-iterable.js +8 -17
  272. package/dist/esm/collection/async-iterable-collection/_shared/async-insert-after-iterable.js.map +1 -1
  273. package/dist/esm/collection/async-iterable-collection/_shared/async-insert-before-iterable.js +8 -17
  274. package/dist/esm/collection/async-iterable-collection/_shared/async-insert-before-iterable.js.map +1 -1
  275. package/dist/esm/collection/async-iterable-collection/_shared/async-map-iterable.js +2 -11
  276. package/dist/esm/collection/async-iterable-collection/_shared/async-map-iterable.js.map +1 -1
  277. package/dist/esm/collection/async-iterable-collection/_shared/async-merge-iterable.js +2 -11
  278. package/dist/esm/collection/async-iterable-collection/_shared/async-merge-iterable.js.map +1 -1
  279. package/dist/esm/collection/async-iterable-collection/_shared/async-partion-iterable.js +9 -18
  280. package/dist/esm/collection/async-iterable-collection/_shared/async-partion-iterable.js.map +1 -1
  281. package/dist/esm/collection/async-iterable-collection/_shared/async-repeat-iterable.js +4 -13
  282. package/dist/esm/collection/async-iterable-collection/_shared/async-repeat-iterable.js.map +1 -1
  283. package/dist/esm/collection/async-iterable-collection/_shared/async-skip-iterable.js +3 -12
  284. package/dist/esm/collection/async-iterable-collection/_shared/async-skip-iterable.js.map +1 -1
  285. package/dist/esm/collection/async-iterable-collection/_shared/async-skip-until-iterable.js +7 -16
  286. package/dist/esm/collection/async-iterable-collection/_shared/async-skip-until-iterable.js.map +1 -1
  287. package/dist/esm/collection/async-iterable-collection/_shared/async-sliding-iterable.js +9 -18
  288. package/dist/esm/collection/async-iterable-collection/_shared/async-sliding-iterable.js.map +1 -1
  289. package/dist/esm/collection/async-iterable-collection/_shared/async-split-iterable.js +17 -26
  290. package/dist/esm/collection/async-iterable-collection/_shared/async-split-iterable.js.map +1 -1
  291. package/dist/esm/collection/async-iterable-collection/_shared/async-take-iterable.js +3 -12
  292. package/dist/esm/collection/async-iterable-collection/_shared/async-take-iterable.js.map +1 -1
  293. package/dist/esm/collection/async-iterable-collection/_shared/async-take-until-iterable.js +4 -13
  294. package/dist/esm/collection/async-iterable-collection/_shared/async-take-until-iterable.js.map +1 -1
  295. package/dist/esm/collection/async-iterable-collection/_shared/async-tap-iterable.js +2 -11
  296. package/dist/esm/collection/async-iterable-collection/_shared/async-tap-iterable.js.map +1 -1
  297. package/dist/esm/collection/async-iterable-collection/_shared/async-unique-iterable.js +6 -15
  298. package/dist/esm/collection/async-iterable-collection/_shared/async-unique-iterable.js.map +1 -1
  299. package/dist/esm/collection/async-iterable-collection/_shared/async-update-iterable.js +5 -14
  300. package/dist/esm/collection/async-iterable-collection/_shared/async-update-iterable.js.map +1 -1
  301. package/dist/esm/collection/async-iterable-collection/_shared/async-when-iterable.js +4 -13
  302. package/dist/esm/collection/async-iterable-collection/_shared/async-when-iterable.js.map +1 -1
  303. package/dist/esm/collection/async-iterable-collection/async-iterable-collection.js +179 -267
  304. package/dist/esm/collection/async-iterable-collection/async-iterable-collection.js.map +1 -1
  305. package/dist/esm/collection/iterable-collection/_shared/chunk-iterable.js +14 -23
  306. package/dist/esm/collection/iterable-collection/_shared/chunk-iterable.js.map +1 -1
  307. package/dist/esm/collection/iterable-collection/_shared/chunk-while-iterable.js +12 -21
  308. package/dist/esm/collection/iterable-collection/_shared/chunk-while-iterable.js.map +1 -1
  309. package/dist/esm/collection/iterable-collection/_shared/collapse-iterable.js +5 -14
  310. package/dist/esm/collection/iterable-collection/_shared/collapse-iterable.js.map +1 -1
  311. package/dist/esm/collection/iterable-collection/_shared/count-by-iterable.js +9 -18
  312. package/dist/esm/collection/iterable-collection/_shared/count-by-iterable.js.map +1 -1
  313. package/dist/esm/collection/iterable-collection/_shared/cross-join-iterable.js +19 -31
  314. package/dist/esm/collection/iterable-collection/_shared/cross-join-iterable.js.map +1 -1
  315. package/dist/esm/collection/iterable-collection/_shared/entries-iterable.js +4 -13
  316. package/dist/esm/collection/iterable-collection/_shared/entries-iterable.js.map +1 -1
  317. package/dist/esm/collection/iterable-collection/_shared/filter-iterable.js +3 -12
  318. package/dist/esm/collection/iterable-collection/_shared/filter-iterable.js.map +1 -1
  319. package/dist/esm/collection/iterable-collection/_shared/flat-map-iterable.js +2 -11
  320. package/dist/esm/collection/iterable-collection/_shared/flat-map-iterable.js.map +1 -1
  321. package/dist/esm/collection/iterable-collection/_shared/group-by-iterable.js +9 -18
  322. package/dist/esm/collection/iterable-collection/_shared/group-by-iterable.js.map +1 -1
  323. package/dist/esm/collection/iterable-collection/_shared/insert-after-iterable.js +6 -16
  324. package/dist/esm/collection/iterable-collection/_shared/insert-after-iterable.js.map +1 -1
  325. package/dist/esm/collection/iterable-collection/_shared/insert-before-iterable.js +6 -16
  326. package/dist/esm/collection/iterable-collection/_shared/insert-before-iterable.js.map +1 -1
  327. package/dist/esm/collection/iterable-collection/_shared/map-iterable.js +2 -11
  328. package/dist/esm/collection/iterable-collection/_shared/map-iterable.js.map +1 -1
  329. package/dist/esm/collection/iterable-collection/_shared/merge-iterable.js +2 -11
  330. package/dist/esm/collection/iterable-collection/_shared/merge-iterable.js.map +1 -1
  331. package/dist/esm/collection/iterable-collection/_shared/pad-end-iterable.js +11 -20
  332. package/dist/esm/collection/iterable-collection/_shared/pad-end-iterable.js.map +1 -1
  333. package/dist/esm/collection/iterable-collection/_shared/pad-start-iterable.js +11 -20
  334. package/dist/esm/collection/iterable-collection/_shared/pad-start-iterable.js.map +1 -1
  335. package/dist/esm/collection/iterable-collection/_shared/partion-iterable.js +9 -18
  336. package/dist/esm/collection/iterable-collection/_shared/partion-iterable.js.map +1 -1
  337. package/dist/esm/collection/iterable-collection/_shared/repeat-iterable.js +4 -13
  338. package/dist/esm/collection/iterable-collection/_shared/repeat-iterable.js.map +1 -1
  339. package/dist/esm/collection/iterable-collection/_shared/reverse-iterable.js +4 -13
  340. package/dist/esm/collection/iterable-collection/_shared/reverse-iterable.js.map +1 -1
  341. package/dist/esm/collection/iterable-collection/_shared/shuffle-iterable.js +9 -18
  342. package/dist/esm/collection/iterable-collection/_shared/shuffle-iterable.js.map +1 -1
  343. package/dist/esm/collection/iterable-collection/_shared/skip-iterable.js +3 -12
  344. package/dist/esm/collection/iterable-collection/_shared/skip-iterable.js.map +1 -1
  345. package/dist/esm/collection/iterable-collection/_shared/skip-until-iterable.js +6 -15
  346. package/dist/esm/collection/iterable-collection/_shared/skip-until-iterable.js.map +1 -1
  347. package/dist/esm/collection/iterable-collection/_shared/slice-iterable.js +15 -24
  348. package/dist/esm/collection/iterable-collection/_shared/slice-iterable.js.map +1 -1
  349. package/dist/esm/collection/iterable-collection/_shared/sliding-iterable.js +9 -18
  350. package/dist/esm/collection/iterable-collection/_shared/sliding-iterable.js.map +1 -1
  351. package/dist/esm/collection/iterable-collection/_shared/sort-iterable.js +1 -10
  352. package/dist/esm/collection/iterable-collection/_shared/sort-iterable.js.map +1 -1
  353. package/dist/esm/collection/iterable-collection/_shared/split-iterable.js +17 -26
  354. package/dist/esm/collection/iterable-collection/_shared/split-iterable.js.map +1 -1
  355. package/dist/esm/collection/iterable-collection/_shared/take-iterable.js +3 -12
  356. package/dist/esm/collection/iterable-collection/_shared/take-iterable.js.map +1 -1
  357. package/dist/esm/collection/iterable-collection/_shared/take-until-iterable.js +4 -13
  358. package/dist/esm/collection/iterable-collection/_shared/take-until-iterable.js.map +1 -1
  359. package/dist/esm/collection/iterable-collection/_shared/tap-iterable.js +2 -11
  360. package/dist/esm/collection/iterable-collection/_shared/tap-iterable.js.map +1 -1
  361. package/dist/esm/collection/iterable-collection/_shared/unique-iterable.js +6 -15
  362. package/dist/esm/collection/iterable-collection/_shared/unique-iterable.js.map +1 -1
  363. package/dist/esm/collection/iterable-collection/_shared/update-iterable.js +5 -14
  364. package/dist/esm/collection/iterable-collection/_shared/update-iterable.js.map +1 -1
  365. package/dist/esm/collection/iterable-collection/_shared/when-iterable.js +4 -13
  366. package/dist/esm/collection/iterable-collection/_shared/when-iterable.js.map +1 -1
  367. package/dist/esm/collection/iterable-collection/_shared/zip-iterable.js +6 -15
  368. package/dist/esm/collection/iterable-collection/_shared/zip-iterable.js.map +1 -1
  369. package/dist/esm/collection/iterable-collection/iterable-collection.js +155 -347
  370. package/dist/esm/collection/iterable-collection/iterable-collection.js.map +1 -1
  371. package/dist/esm/collection/list-collection/list-collection.js +349 -932
  372. package/dist/esm/collection/list-collection/list-collection.js.map +1 -1
  373. package/dist/esm/storage/storage.js +25 -15
  374. package/dist/esm/storage/storage.js.map +1 -1
  375. package/dist/esm/utilities/_module.js +2 -0
  376. package/dist/esm/utilities/_module.js.map +1 -0
  377. package/dist/esm/utilities/time-span/_module.js +2 -0
  378. package/dist/esm/utilities/time-span/_module.js.map +1 -0
  379. package/dist/esm/utilities/time-span/time-span.js +99 -0
  380. package/dist/esm/utilities/time-span/time-span.js.map +1 -0
  381. package/dist/types/_module.d.ts +2 -0
  382. package/dist/types/_shared/types.d.ts +2 -2
  383. package/dist/types/async/_module.d.ts +11 -0
  384. package/dist/types/async/_shared.d.ts +35 -0
  385. package/dist/types/async/abortable/_module.d.ts +1 -0
  386. package/dist/types/async/abortable/abortable.d.ts +39 -0
  387. package/dist/types/async/abortable-iterable/_module.d.ts +1 -0
  388. package/dist/types/async/abortable-iterable/abortable-iterable.d.ts +36 -0
  389. package/dist/types/async/backof-policies/_module.d.ts +5 -0
  390. package/dist/types/async/backof-policies/_shared.d.ts +12 -0
  391. package/dist/types/async/backof-policies/constant-backoff-policy/_module.d.ts +1 -0
  392. package/dist/types/async/backof-policies/constant-backoff-policy/constant-backoff-policy.d.ts +28 -0
  393. package/dist/types/async/backof-policies/exponential-backoff-policy/_module.d.ts +1 -0
  394. package/dist/types/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.d.ts +36 -0
  395. package/dist/types/async/backof-policies/linear-backoff-policy/_module.d.ts +1 -0
  396. package/dist/types/async/backof-policies/linear-backoff-policy/linear-backoff-policy.d.ts +32 -0
  397. package/dist/types/async/backof-policies/polynomial-backoff-policy/_module.d.ts +1 -0
  398. package/dist/types/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.d.ts +36 -0
  399. package/dist/types/async/delay/_module.d.ts +1 -0
  400. package/dist/types/async/delay/delay.d.ts +38 -0
  401. package/dist/types/async/delay-iterable/_module.d.ts +1 -0
  402. package/dist/types/async/delay-iterable/delay-iterable.d.ts +57 -0
  403. package/dist/types/async/lazy-promise/_module.d.ts +1 -0
  404. package/dist/types/async/lazy-promise/lazy-promise.d.ts +28 -0
  405. package/dist/types/async/retry/_module.d.ts +1 -0
  406. package/dist/types/async/retry/retry.d.ts +86 -0
  407. package/dist/types/async/retry-iterable/_module.d.ts +1 -0
  408. package/dist/types/async/retry-iterable/retry-iterable.d.ts +86 -0
  409. package/dist/types/async/timeout/_module.d.ts +1 -0
  410. package/dist/types/async/timeout/timeout.d.ts +40 -0
  411. package/dist/types/async/timeout-iterable/_module.d.ts +1 -0
  412. package/dist/types/async/timeout-iterable/timeout-iterable.d.ts +64 -0
  413. package/dist/types/collection/async-iterable-collection/_shared/_module.d.ts +1 -3
  414. package/dist/types/collection/async-iterable-collection/_shared/async-error-handler-iterable.d.ts +6 -0
  415. package/dist/types/collection/async-iterable-collection/_shared/async-when-iterable.d.ts +1 -1
  416. package/dist/types/collection/async-iterable-collection/async-iterable-collection.d.ts +39 -37
  417. package/dist/types/contracts/collection/_shared.d.ts +7 -7
  418. package/dist/types/contracts/collection/async-collection.contract.d.ts +51 -39
  419. package/dist/types/contracts/storage/storage.contract.d.ts +2 -1
  420. package/dist/types/storage/storage.d.ts +5 -3
  421. package/dist/types/utilities/_module.d.ts +1 -0
  422. package/dist/types/utilities/time-span/_module.d.ts +1 -0
  423. package/dist/types/utilities/time-span/time-span.d.ts +50 -0
  424. package/package.json +1 -1
  425. package/dist/cjs/collection/async-iterable-collection/_shared/async-abort-iterable.js +0 -25
  426. package/dist/cjs/collection/async-iterable-collection/_shared/async-abort-iterable.js.map +0 -1
  427. package/dist/cjs/collection/async-iterable-collection/_shared/async-delay-iterable.js +0 -25
  428. package/dist/cjs/collection/async-iterable-collection/_shared/async-delay-iterable.js.map +0 -1
  429. package/dist/cjs/collection/async-iterable-collection/_shared/async-timeout-iterable.js +0 -21
  430. package/dist/cjs/collection/async-iterable-collection/_shared/async-timeout-iterable.js.map +0 -1
  431. package/dist/esm/collection/async-iterable-collection/_shared/async-abort-iterable.js +0 -21
  432. package/dist/esm/collection/async-iterable-collection/_shared/async-abort-iterable.js.map +0 -1
  433. package/dist/esm/collection/async-iterable-collection/_shared/async-delay-iterable.js +0 -21
  434. package/dist/esm/collection/async-iterable-collection/_shared/async-delay-iterable.js.map +0 -1
  435. package/dist/esm/collection/async-iterable-collection/_shared/async-timeout-iterable.js +0 -17
  436. package/dist/esm/collection/async-iterable-collection/_shared/async-timeout-iterable.js.map +0 -1
  437. package/dist/types/collection/async-iterable-collection/_shared/async-abort-iterable.d.ts +0 -10
  438. package/dist/types/collection/async-iterable-collection/_shared/async-delay-iterable.d.ts +0 -10
  439. package/dist/types/collection/async-iterable-collection/_shared/async-timeout-iterable.d.ts +0 -10
@@ -14,8 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./async/_module"), exports);
17
18
  __exportStar(require("./contracts/_module"), exports);
18
19
  __exportStar(require("./collection/_module"), exports);
19
20
  __exportStar(require("./serializer/_module"), exports);
20
21
  __exportStar(require("./storage/_module"), exports);
22
+ __exportStar(require("./utilities/_module"), exports);
21
23
  //# sourceMappingURL=_module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../src/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,uDAAqC;AACrC,uDAAqC;AACrC,oDAAkC"}
1
+ {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../src/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,sDAAoC;AACpC,uDAAqC;AACrC,uDAAqC;AACrC,oDAAkC;AAClC,sDAAoC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.unstable_retryIterable = void 0;
18
+ __exportStar(require("../async/_shared"), exports);
19
+ __exportStar(require("../async/abortable/_module"), exports);
20
+ __exportStar(require("../async/abortable-iterable/_module"), exports);
21
+ __exportStar(require("../async/backof-policies/_module"), exports);
22
+ __exportStar(require("../async/delay/_module"), exports);
23
+ __exportStar(require("../async/delay-iterable/_module"), exports);
24
+ __exportStar(require("../async/lazy-promise/_module"), exports);
25
+ __exportStar(require("../async/retry/_module"), exports);
26
+ var _module_1 = require("../async/retry-iterable/_module");
27
+ Object.defineProperty(exports, "unstable_retryIterable", { enumerable: true, get: function () { return _module_1.retryIterable; } });
28
+ __exportStar(require("../async/timeout/_module"), exports);
29
+ __exportStar(require("../async/timeout-iterable/_module"), exports);
30
+ //# sourceMappingURL=_module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../src/async/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,4DAA0C;AAC1C,qEAAmD;AACnD,kEAAgD;AAChD,wDAAsC;AACtC,iEAA+C;AAC/C,+DAA6C;AAC7C,wDAAsC;AACtC,0DAAyF;AAAhF,iHAAA,aAAa,OAA0B;AAChD,0DAAwC;AACxC,mEAAiD"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RetryAsyncError = exports.TimeoutAsyncError = exports.AbortAsyncError = exports.AsyncError = void 0;
4
+ class AsyncError extends Error {
5
+ constructor(message, cause) {
6
+ super(message, { cause });
7
+ this.name = AsyncError.name;
8
+ }
9
+ }
10
+ exports.AsyncError = AsyncError;
11
+ class AbortAsyncError extends AsyncError {
12
+ constructor(message, cause) {
13
+ super(message, cause);
14
+ this.name = AbortAsyncError.name;
15
+ }
16
+ }
17
+ exports.AbortAsyncError = AbortAsyncError;
18
+ class TimeoutAsyncError extends AsyncError {
19
+ constructor(message, cause) {
20
+ super(message, cause);
21
+ this.name = TimeoutAsyncError.name;
22
+ }
23
+ }
24
+ exports.TimeoutAsyncError = TimeoutAsyncError;
25
+ class RetryAsyncError extends AsyncError {
26
+ maxAttempts;
27
+ constructor(message, { cause, maxAttempts }) {
28
+ super(message, cause);
29
+ this.name = RetryAsyncError.name;
30
+ this.maxAttempts = maxAttempts;
31
+ }
32
+ }
33
+ exports.RetryAsyncError = RetryAsyncError;
34
+ //# sourceMappingURL=_shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_shared.js","sourceRoot":"","sources":["../../../src/async/_shared.ts"],"names":[],"mappings":";;;AAOA,MAAa,UAAW,SAAQ,KAAK;IACjC,YAAY,OAAe,EAAE,KAAe;QACxC,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;IAChC,CAAC;CACJ;AALD,gCAKC;AAKD,MAAa,eAAgB,SAAQ,UAAU;IAC3C,YAAY,OAAe,EAAE,KAAe;QACxC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;IACrC,CAAC;CACJ;AALD,0CAKC;AAKD,MAAa,iBAAkB,SAAQ,UAAU;IAC7C,YAAY,OAAe,EAAE,KAAe;QACxC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC;IACvC,CAAC;CACJ;AALD,8CAKC;AAaD,MAAa,eAAgB,SAAQ,UAAU;IAC3B,WAAW,CAAS;IAEpC,YAAY,OAAe,EAAE,EAAE,KAAK,EAAE,WAAW,EAAuB;QACpE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;QACjC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;CACJ;AARD,0CAQC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("../../async/abortable/abortable"), exports);
18
+ //# sourceMappingURL=_module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../src/async/abortable/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.abortable = abortable;
4
+ const _shared_1 = require("../../async/_shared");
5
+ const _module_1 = require("../../async/lazy-promise/_module");
6
+ function abortSignalToPromise(abortSignal) {
7
+ let reject_ = null;
8
+ function abort() {
9
+ if (reject_ === null) {
10
+ return;
11
+ }
12
+ reject_(new _shared_1.AbortAsyncError(`Promise was aborted with reason of "${String(abortSignal.reason)}"`, abortSignal.reason));
13
+ }
14
+ if (abortSignal.aborted) {
15
+ return {
16
+ promise: Promise.reject(new _shared_1.AbortAsyncError(`Promise was aborted with reason of "${String(abortSignal.aborted)}"`, abortSignal.reason)),
17
+ abort,
18
+ };
19
+ }
20
+ return {
21
+ promise: new Promise((_resolve, reject) => {
22
+ reject_ = reject;
23
+ if (abortSignal.aborted) {
24
+ abort();
25
+ return;
26
+ }
27
+ abortSignal.addEventListener("abort", abort, {
28
+ once: true,
29
+ });
30
+ }),
31
+ abort,
32
+ };
33
+ }
34
+ function abortable(asyncFn, abortSignal) {
35
+ return new _module_1.LazyPromise(async () => {
36
+ if (abortSignal.aborted) {
37
+ throw new _shared_1.AbortAsyncError(`Promise was aborted with reason of "${String(abortSignal.reason)}"`, abortSignal.reason);
38
+ }
39
+ const { promise: abortSignalPromise, abort } = abortSignalToPromise(abortSignal);
40
+ try {
41
+ return await Promise.race([asyncFn(), abortSignalPromise]);
42
+ }
43
+ finally {
44
+ abortSignal.removeEventListener("abort", abort);
45
+ }
46
+ });
47
+ }
48
+ //# sourceMappingURL=abortable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abortable.js","sourceRoot":"","sources":["../../../../src/async/abortable/abortable.ts"],"names":[],"mappings":";;AA8FA,8BAoBC;AA9GD,6CAIyB;AACzB,0DAA2D;AAK3D,SAAS,oBAAoB,CACzB,WAAwB;IAKxB,IAAI,OAAO,GAAsC,IAAI,CAAC;IACtD,SAAS,KAAK;QACV,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACnB,OAAO;QACX,CAAC;QACD,OAAO,CACH,IAAI,yBAAe,CACf,uCAAuC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,EACpE,WAAW,CAAC,MAAM,CACrB,CACJ,CAAC;IACN,CAAC;IAED,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;QACtB,OAAO;YACH,OAAO,EAAE,OAAO,CAAC,MAAM,CACnB,IAAI,yBAAe,CACf,uCAAuC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,EACrE,WAAW,CAAC,MAAM,CACrB,CACJ;YACD,KAAK;SACR,CAAC;IACN,CAAC;IAED,OAAO;QACH,OAAO,EAAE,IAAI,OAAO,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE;YACtC,OAAO,GAAG,MAAM,CAAC;YACjB,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;gBACtB,KAAK,EAAE,CAAC;gBACR,OAAO;YACX,CAAC;YACD,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE;gBACzC,IAAI,EAAE,IAAI;aACb,CAAC,CAAC;QACP,CAAC,CAAC;QACF,KAAK;KACR,CAAC;AACN,CAAC;AAoCD,SAAgB,SAAS,CACrB,OAAkC,EAClC,WAAwB;IAExB,OAAO,IAAI,qBAAW,CAAC,KAAK,IAAI,EAAE;QAC9B,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;YACtB,MAAM,IAAI,yBAAe,CACrB,uCAAuC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,EACpE,WAAW,CAAC,MAAM,CACrB,CAAC;QACN,CAAC;QAED,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,GACxC,oBAAoB,CAAS,WAAW,CAAC,CAAC;QAC9C,IAAI,CAAC;YACD,OAAO,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,kBAAkB,CAAC,CAAC,CAAC;QAC/D,CAAC;gBAAS,CAAC;YACP,WAAW,CAAC,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACpD,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("../../async/abortable-iterable/abortable-iterable"), exports);
18
+ //# sourceMappingURL=_module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../src/async/abortable-iterable/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gFAA8D"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.abortableIterable = abortableIterable;
4
+ const _shared_1 = require("../../async/_shared");
5
+ const _module_1 = require("../../async/abortable/_module");
6
+ class AbortableIterable {
7
+ iterable;
8
+ abortSignal;
9
+ constructor(iterable, abortSignal) {
10
+ this.iterable = iterable;
11
+ this.abortSignal = abortSignal;
12
+ }
13
+ async *[Symbol.asyncIterator]() {
14
+ const iterator = this.iterable[Symbol.asyncIterator]();
15
+ let result = await (0, _module_1.abortable)(() => iterator.next(), this.abortSignal);
16
+ yield result.value;
17
+ while (!result.done) {
18
+ if (this.abortSignal.aborted) {
19
+ throw new _shared_1.AbortAsyncError(`Promise was aborted with reason of "${String(this.abortSignal.aborted)}"`, this.abortSignal.reason);
20
+ }
21
+ result = await (0, _module_1.abortable)(() => iterator.next(), this.abortSignal);
22
+ if (result.done) {
23
+ return result.value;
24
+ }
25
+ yield result.value;
26
+ }
27
+ }
28
+ }
29
+ function abortableIterable(iterable, abortSignal) {
30
+ return new AbortableIterable(iterable, abortSignal);
31
+ }
32
+ //# sourceMappingURL=abortable-iterable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abortable-iterable.js","sourceRoot":"","sources":["../../../../src/async/abortable-iterable/abortable-iterable.ts"],"names":[],"mappings":";;AA0EA,8CAKC;AA3ED,6CAIyB;AACzB,uDAAsD;AAKtD,MAAM,iBAAiB;IAEE;IACA;IAFrB,YACqB,QAA+B,EAC/B,WAAwB;QADxB,aAAQ,GAAR,QAAQ,CAAuB;QAC/B,gBAAW,GAAX,WAAW,CAAa;IAC1C,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QACvD,IAAI,MAAM,GAAG,MAAM,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QACtE,MAAM,MAAM,CAAC,KAAK,CAAC;QAEnB,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YAClB,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;gBAC3B,MAAM,IAAI,yBAAe,CACrB,uCAAuC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,EAC1E,IAAI,CAAC,WAAW,CAAC,MAAM,CAC1B,CAAC;YACN,CAAC;YACD,MAAM,GAAG,MAAM,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YAClE,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;gBAEd,OAAO,MAAM,CAAC,KAAK,CAAC;YACxB,CAAC;YACD,MAAM,MAAM,CAAC,KAAK,CAAC;QACvB,CAAC;IACL,CAAC;CACJ;AAkCD,SAAgB,iBAAiB,CAC7B,QAA+B,EAC/B,WAAwB;IAExB,OAAO,IAAI,iBAAiB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;AACxD,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("../../async/backof-policies/constant-backoff-policy/_module"), exports);
18
+ __exportStar(require("../../async/backof-policies/exponential-backoff-policy/_module"), exports);
19
+ __exportStar(require("../../async/backof-policies/linear-backoff-policy/_module"), exports);
20
+ __exportStar(require("../../async/backof-policies/polynomial-backoff-policy/_module"), exports);
21
+ //# sourceMappingURL=_module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../src/async/backof-policies/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,0FAAwE;AACxE,6FAA2E;AAC3E,wFAAsE;AACtE,4FAA0E"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.withJitter = withJitter;
4
+ function withJitter(jitter, value, mathRandom) {
5
+ return (1 - jitter * mathRandom()) * value;
6
+ }
7
+ //# sourceMappingURL=_shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_shared.js","sourceRoot":"","sources":["../../../../src/async/backof-policies/_shared.ts"],"names":[],"mappings":";;AAaA,gCAMC;AAND,SAAgB,UAAU,CACtB,MAAc,EACd,KAAa,EACb,UAAwB;IAExB,OAAO,CAAC,CAAC,GAAG,MAAM,GAAG,UAAU,EAAE,CAAC,GAAG,KAAK,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("../../../async/backof-policies/constant-backoff-policy/constant-backoff-policy"), exports);
18
+ //# sourceMappingURL=_module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/async/backof-policies/constant-backoff-policy/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0GAAwF"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.constantBackoffPolicy = constantBackoffPolicy;
4
+ const _module_1 = require("../../../utilities/_module");
5
+ const _shared_1 = require("../../../async/backof-policies/_shared");
6
+ function constantBackoffPolicy(settings = {}) {
7
+ return (_attempt, error) => {
8
+ if (typeof settings === "function") {
9
+ settings = settings(error);
10
+ }
11
+ let { delay = 1000 } = settings;
12
+ if (delay instanceof _module_1.TimeSpan) {
13
+ delay = delay.toMilliseconds();
14
+ }
15
+ const { jitter = 0.5, _mathRandom = Math.random } = settings;
16
+ return (0, _shared_1.withJitter)(jitter, delay, _mathRandom);
17
+ };
18
+ }
19
+ //# sourceMappingURL=constant-backoff-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constant-backoff-policy.js","sourceRoot":"","sources":["../../../../../src/async/backof-policies/constant-backoff-policy/constant-backoff-policy.ts"],"names":[],"mappings":";;AAiCA,sDAgBC;AA7CD,iDAA+C;AAC/C,6DAGyC;AAyBzC,SAAgB,qBAAqB,CACjC,WAE4D,EAAE;IAE9D,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE;QACvB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;YACjC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;QACD,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,QAAQ,CAAC;QAChC,IAAI,KAAK,YAAY,kBAAQ,EAAE,CAAC;YAC5B,KAAK,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC;QACnC,CAAC;QACD,MAAM,EAAE,MAAM,GAAG,GAAG,EAAE,WAAW,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC;QAC7D,OAAO,IAAA,oBAAU,EAAC,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IAClD,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("../../../async/backof-policies/exponential-backoff-policy/exponential-backoff-policy"), exports);
18
+ //# sourceMappingURL=_module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/async/backof-policies/exponential-backoff-policy/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gHAA8F"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.exponentialBackoffPolicy = exponentialBackoffPolicy;
4
+ const _module_1 = require("../../../utilities/_module");
5
+ const _shared_1 = require("../../../async/backof-policies/_shared");
6
+ function exponentialBackoffPolicy(settings = {}) {
7
+ return (attempt, error) => {
8
+ if (typeof settings === "function") {
9
+ settings = settings(error);
10
+ }
11
+ let { maxDelay = 60_000, minDelay = 1_000 } = settings;
12
+ if (maxDelay instanceof _module_1.TimeSpan) {
13
+ maxDelay = maxDelay.toMilliseconds();
14
+ }
15
+ if (minDelay instanceof _module_1.TimeSpan) {
16
+ minDelay = minDelay.toMilliseconds();
17
+ }
18
+ const { multiplier = 2, jitter = 0.5, _mathRandom = Math.random, } = settings;
19
+ const exponential = Math.min(maxDelay, minDelay * Math.pow(multiplier, attempt));
20
+ return (0, _shared_1.withJitter)(jitter, exponential, _mathRandom);
21
+ };
22
+ }
23
+ //# sourceMappingURL=exponential-backoff-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exponential-backoff-policy.js","sourceRoot":"","sources":["../../../../../src/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.ts"],"names":[],"mappings":";;AAuCA,4DA2BC;AA9DD,iDAA+C;AAE/C,6DAA6D;AAiC7D,SAAgB,wBAAwB,CACpC,WAE+D,EAAE;IAEjE,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;QACtB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;YACjC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;QACD,IAAI,EAAE,QAAQ,GAAG,MAAM,EAAE,QAAQ,GAAG,KAAK,EAAE,GAAG,QAAQ,CAAC;QACvD,IAAI,QAAQ,YAAY,kBAAQ,EAAE,CAAC;YAC/B,QAAQ,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;QACzC,CAAC;QACD,IAAI,QAAQ,YAAY,kBAAQ,EAAE,CAAC;YAC/B,QAAQ,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;QACzC,CAAC;QACD,MAAM,EACF,UAAU,GAAG,CAAC,EACd,MAAM,GAAG,GAAG,EACZ,WAAW,GAAG,IAAI,CAAC,MAAM,GAC5B,GAAG,QAAQ,CAAC;QACb,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CACxB,QAAQ,EACR,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAC3C,CAAC;QACF,OAAO,IAAA,oBAAU,EAAC,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IACxD,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("../../../async/backof-policies/linear-backoff-policy/linear-backoff-policy"), exports);
18
+ //# sourceMappingURL=_module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/async/backof-policies/linear-backoff-policy/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sGAAoF"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.linearBackoffPolicy = linearBackoffPolicy;
4
+ const _module_1 = require("../../../utilities/_module");
5
+ const _shared_1 = require("../../../async/backof-policies/_shared");
6
+ function linearBackoffPolicy(settings = {}) {
7
+ return (attempt, error) => {
8
+ if (typeof settings === "function") {
9
+ settings = settings(error);
10
+ }
11
+ let { maxDelay = 6000, minDelay = 1_000 } = settings;
12
+ if (maxDelay instanceof _module_1.TimeSpan) {
13
+ maxDelay = maxDelay.toMilliseconds();
14
+ }
15
+ if (minDelay instanceof _module_1.TimeSpan) {
16
+ minDelay = minDelay.toMilliseconds();
17
+ }
18
+ const { jitter = 0.5, _mathRandom = Math.random } = settings;
19
+ const linear = Math.min(maxDelay, minDelay * attempt);
20
+ return (0, _shared_1.withJitter)(jitter, linear, _mathRandom);
21
+ };
22
+ }
23
+ //# sourceMappingURL=linear-backoff-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linear-backoff-policy.js","sourceRoot":"","sources":["../../../../../src/async/backof-policies/linear-backoff-policy/linear-backoff-policy.ts"],"names":[],"mappings":";;AAmCA,kDAoBC;AAnDD,iDAA+C;AAE/C,6DAA6D;AA6B7D,SAAgB,mBAAmB,CAC/B,WAE0D,EAAE;IAE5D,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;QACtB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;YACjC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;QACD,IAAI,EAAE,QAAQ,GAAG,IAAI,EAAE,QAAQ,GAAG,KAAK,EAAE,GAAG,QAAQ,CAAC;QACrD,IAAI,QAAQ,YAAY,kBAAQ,EAAE,CAAC;YAC/B,QAAQ,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;QACzC,CAAC;QACD,IAAI,QAAQ,YAAY,kBAAQ,EAAE,CAAC;YAC/B,QAAQ,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;QACzC,CAAC;QACD,MAAM,EAAE,MAAM,GAAG,GAAG,EAAE,WAAW,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC;QAC7D,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC;QACtD,OAAO,IAAA,oBAAU,EAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;IACnD,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("../../../async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy"), exports);
18
+ //# sourceMappingURL=_module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/async/backof-policies/polynomial-backoff-policy/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8GAA4F"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.polynomialBackoffPolicy = polynomialBackoffPolicy;
4
+ const _module_1 = require("../../../utilities/_module");
5
+ const _shared_1 = require("../../../async/backof-policies/_shared");
6
+ function polynomialBackoffPolicy(settings = {}) {
7
+ return (attempt, error) => {
8
+ if (typeof settings === "function") {
9
+ settings = settings(error);
10
+ }
11
+ let { maxDelay = 6000, minDelay = 1_000 } = settings;
12
+ if (maxDelay instanceof _module_1.TimeSpan) {
13
+ maxDelay = maxDelay.toMilliseconds();
14
+ }
15
+ if (minDelay instanceof _module_1.TimeSpan) {
16
+ minDelay = minDelay.toMilliseconds();
17
+ }
18
+ const { degree = 2, jitter = 0.5, _mathRandom = Math.random, } = settings;
19
+ const polynomial = Math.min(maxDelay, minDelay * Math.pow(attempt, degree));
20
+ return (0, _shared_1.withJitter)(jitter, polynomial, _mathRandom);
21
+ };
22
+ }
23
+ //# sourceMappingURL=polynomial-backoff-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polynomial-backoff-policy.js","sourceRoot":"","sources":["../../../../../src/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.ts"],"names":[],"mappings":";;AAuCA,0DA2BC;AA9DD,iDAA+C;AAE/C,6DAA6D;AAiC7D,SAAgB,uBAAuB,CACnC,WAE8D,EAAE;IAEhE,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;QACtB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;YACjC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;QACD,IAAI,EAAE,QAAQ,GAAG,IAAI,EAAE,QAAQ,GAAG,KAAK,EAAE,GAAG,QAAQ,CAAC;QACrD,IAAI,QAAQ,YAAY,kBAAQ,EAAE,CAAC;YAC/B,QAAQ,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;QACzC,CAAC;QACD,IAAI,QAAQ,YAAY,kBAAQ,EAAE,CAAC;YAC/B,QAAQ,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;QACzC,CAAC;QACD,MAAM,EACF,MAAM,GAAG,CAAC,EACV,MAAM,GAAG,GAAG,EACZ,WAAW,GAAG,IAAI,CAAC,MAAM,GAC5B,GAAG,QAAQ,CAAC;QACb,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CACvB,QAAQ,EACR,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CACvC,CAAC;QACF,OAAO,IAAA,oBAAU,EAAC,MAAM,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;IACvD,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("../../async/delay/delay"), exports);
18
+ //# sourceMappingURL=_module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../src/async/delay/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.delay = delay;
4
+ const _module_1 = require("../../async/abortable/_module");
5
+ const _module_2 = require("../../async/lazy-promise/_module");
6
+ function delay(time, abortSignal = new AbortController().signal) {
7
+ return new _module_2.LazyPromise(async () => {
8
+ let timeoutId = null;
9
+ const delay = new Promise((resolve) => {
10
+ timeoutId = setTimeout(() => {
11
+ resolve();
12
+ }, time.toMilliseconds());
13
+ });
14
+ try {
15
+ await (0, _module_1.abortable)(() => delay, abortSignal);
16
+ }
17
+ finally {
18
+ if (timeoutId === null) {
19
+ clearTimeout(timeoutId);
20
+ }
21
+ }
22
+ });
23
+ }
24
+ //# sourceMappingURL=delay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delay.js","sourceRoot":"","sources":["../../../../src/async/delay/delay.ts"],"names":[],"mappings":";;AA8CA,sBAqBC;AAxDD,uDAAsD;AACtD,0DAA2D;AAkC3D,SAAgB,KAAK,CACjB,IAAc,EACd,cAA2B,IAAI,eAAe,EAAE,CAAC,MAAM;IAEvD,OAAO,IAAI,qBAAW,CAAC,KAAK,IAAI,EAAE;QAE9B,IAAI,SAAS,GAAQ,IAAI,CAAC;QAC1B,MAAM,KAAK,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YACxC,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;gBACxB,OAAO,EAAE,CAAC;YACd,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;QACH,IAAI,CAAC;YACD,MAAM,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAC9C,CAAC;gBAAS,CAAC;YACP,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;gBAErB,YAAY,CAAC,SAAS,CAAC,CAAC;YAC5B,CAAC;QACL,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("../../async/delay-iterable/delay-iterable"), exports);
18
+ //# sourceMappingURL=_module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../src/async/delay-iterable/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wEAAsD"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.delayIterable = delayIterable;
4
+ const _shared_1 = require("../../async/_shared");
5
+ const _module_1 = require("../../async/abortable/_module");
6
+ const delay_1 = require("../../async/delay/delay");
7
+ class DelayIterable {
8
+ iterable;
9
+ time;
10
+ abortSignal;
11
+ constructor(iterable, time, abortSignal) {
12
+ this.iterable = iterable;
13
+ this.time = time;
14
+ this.abortSignal = abortSignal;
15
+ }
16
+ async *[Symbol.asyncIterator]() {
17
+ const iterator = this.iterable[Symbol.asyncIterator]();
18
+ let result = await (0, _module_1.abortable)(() => iterator.next(), this.abortSignal);
19
+ yield result.value;
20
+ while (!result.done) {
21
+ if (this.abortSignal.aborted) {
22
+ throw new _shared_1.AbortAsyncError(`Promise was aborted with reason of "${String(this.abortSignal.aborted)}"`, this.abortSignal.reason);
23
+ }
24
+ await (0, delay_1.delay)(this.time, this.abortSignal);
25
+ result = await (0, _module_1.abortable)(() => iterator.next(), this.abortSignal);
26
+ if (result.done) {
27
+ return result.value;
28
+ }
29
+ yield result.value;
30
+ }
31
+ }
32
+ }
33
+ function delayIterable(iterable, time, abortSignal = new AbortController().signal) {
34
+ return new DelayIterable(iterable, time, abortSignal);
35
+ }
36
+ //# sourceMappingURL=delay-iterable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delay-iterable.js","sourceRoot":"","sources":["../../../../src/async/delay-iterable/delay-iterable.ts"],"names":[],"mappings":";;AAgGA,sCAMC;AA/FD,6CAAkD;AAClD,uDAAsD;AACtD,+CAA4C;AAK5C,MAAM,aAAa;IAEM;IACA;IACA;IAHrB,YACqB,QAA+B,EAC/B,IAAc,EACd,WAAwB;QAFxB,aAAQ,GAAR,QAAQ,CAAuB;QAC/B,SAAI,GAAJ,IAAI,CAAU;QACd,gBAAW,GAAX,WAAW,CAAa;IAC1C,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QACvD,IAAI,MAAM,GAAG,MAAM,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QACtE,MAAM,MAAM,CAAC,KAAK,CAAC;QAEnB,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YAClB,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;gBAC3B,MAAM,IAAI,yBAAe,CACrB,uCAAuC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,EAC1E,IAAI,CAAC,WAAW,CAAC,MAAM,CAC1B,CAAC;YACN,CAAC;YACD,MAAM,IAAA,aAAK,EAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YACzC,MAAM,GAAG,MAAM,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YAClE,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;gBAEd,OAAO,MAAM,CAAC,KAAK,CAAC;YACxB,CAAC;YACD,MAAM,MAAM,CAAC,KAAK,CAAC;QACvB,CAAC;IACL,CAAC;CACJ;AAsDD,SAAgB,aAAa,CACzB,QAA+B,EAC/B,IAAc,EACd,cAA2B,IAAI,eAAe,EAAE,CAAC,MAAM;IAEvD,OAAO,IAAI,aAAa,CAAC,QAAQ,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("../../async/lazy-promise/lazy-promise"), exports);
18
+ //# sourceMappingURL=_module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../src/async/lazy-promise/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oEAAkD"}