@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.
- package/dist/cjs/_module.js +2 -0
- package/dist/cjs/_module.js.map +1 -1
- package/dist/cjs/async/_module.js +30 -0
- package/dist/cjs/async/_module.js.map +1 -0
- package/dist/cjs/async/_shared.js +34 -0
- package/dist/cjs/async/_shared.js.map +1 -0
- package/dist/cjs/async/abortable/_module.js +18 -0
- package/dist/cjs/async/abortable/_module.js.map +1 -0
- package/dist/cjs/async/abortable/abortable.js +48 -0
- package/dist/cjs/async/abortable/abortable.js.map +1 -0
- package/dist/cjs/async/abortable-iterable/_module.js +18 -0
- package/dist/cjs/async/abortable-iterable/_module.js.map +1 -0
- package/dist/cjs/async/abortable-iterable/abortable-iterable.js +32 -0
- package/dist/cjs/async/abortable-iterable/abortable-iterable.js.map +1 -0
- package/dist/cjs/async/backof-policies/_module.js +21 -0
- package/dist/cjs/async/backof-policies/_module.js.map +1 -0
- package/dist/cjs/async/backof-policies/_shared.js +7 -0
- package/dist/cjs/async/backof-policies/_shared.js.map +1 -0
- package/dist/cjs/async/backof-policies/constant-backoff-policy/_module.js +18 -0
- package/dist/cjs/async/backof-policies/constant-backoff-policy/_module.js.map +1 -0
- package/dist/cjs/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js +19 -0
- package/dist/cjs/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +1 -0
- package/dist/cjs/async/backof-policies/exponential-backoff-policy/_module.js +18 -0
- package/dist/cjs/async/backof-policies/exponential-backoff-policy/_module.js.map +1 -0
- package/dist/cjs/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js +23 -0
- package/dist/cjs/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +1 -0
- package/dist/cjs/async/backof-policies/linear-backoff-policy/_module.js +18 -0
- package/dist/cjs/async/backof-policies/linear-backoff-policy/_module.js.map +1 -0
- package/dist/cjs/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js +23 -0
- package/dist/cjs/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +1 -0
- package/dist/cjs/async/backof-policies/polynomial-backoff-policy/_module.js +18 -0
- package/dist/cjs/async/backof-policies/polynomial-backoff-policy/_module.js.map +1 -0
- package/dist/cjs/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js +23 -0
- package/dist/cjs/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +1 -0
- package/dist/cjs/async/delay/_module.js +18 -0
- package/dist/cjs/async/delay/_module.js.map +1 -0
- package/dist/cjs/async/delay/delay.js +24 -0
- package/dist/cjs/async/delay/delay.js.map +1 -0
- package/dist/cjs/async/delay-iterable/_module.js +18 -0
- package/dist/cjs/async/delay-iterable/_module.js.map +1 -0
- package/dist/cjs/async/delay-iterable/delay-iterable.js +36 -0
- package/dist/cjs/async/delay-iterable/delay-iterable.js.map +1 -0
- package/dist/cjs/async/lazy-promise/_module.js +18 -0
- package/dist/cjs/async/lazy-promise/_module.js.map +1 -0
- package/dist/cjs/async/lazy-promise/lazy-promise.js +22 -0
- package/dist/cjs/async/lazy-promise/lazy-promise.js.map +1 -0
- package/dist/cjs/async/retry/_module.js +18 -0
- package/dist/cjs/async/retry/_module.js.map +1 -0
- package/dist/cjs/async/retry/retry.js +43 -0
- package/dist/cjs/async/retry/retry.js.map +1 -0
- package/dist/cjs/async/retry-iterable/_module.js +18 -0
- package/dist/cjs/async/retry-iterable/_module.js.map +1 -0
- package/dist/cjs/async/retry-iterable/retry-iterable.js +32 -0
- package/dist/cjs/async/retry-iterable/retry-iterable.js.map +1 -0
- package/dist/cjs/async/timeout/_module.js +18 -0
- package/dist/cjs/async/timeout/_module.js.map +1 -0
- package/dist/cjs/async/timeout/timeout.js +28 -0
- package/dist/cjs/async/timeout/timeout.js.map +1 -0
- package/dist/cjs/async/timeout-iterable/_module.js +18 -0
- package/dist/cjs/async/timeout-iterable/_module.js.map +1 -0
- package/dist/cjs/async/timeout-iterable/timeout-iterable.js +11 -0
- package/dist/cjs/async/timeout-iterable/timeout-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/_module.js +1 -3
- package/dist/cjs/collection/async-iterable-collection/_shared/_module.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-chunk-iterable.js +14 -23
- package/dist/cjs/collection/async-iterable-collection/_shared/async-chunk-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-chunk-while-iterable.js +12 -21
- package/dist/cjs/collection/async-iterable-collection/_shared/async-chunk-while-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-collapse-iterable.js +5 -14
- package/dist/cjs/collection/async-iterable-collection/_shared/async-collapse-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-count-by-iterable.js +9 -18
- package/dist/cjs/collection/async-iterable-collection/_shared/async-count-by-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-cross-join-iterable.js +18 -27
- package/dist/cjs/collection/async-iterable-collection/_shared/async-cross-join-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-error-handler-iterable.js +31 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/async-error-handler-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/async-filter-iterable.js +3 -12
- package/dist/cjs/collection/async-iterable-collection/_shared/async-filter-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-flat-map-iterable.js +2 -11
- package/dist/cjs/collection/async-iterable-collection/_shared/async-flat-map-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-after-iterable.js +8 -17
- package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-after-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-before-iterable.js +8 -17
- package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-before-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-map-iterable.js +2 -11
- package/dist/cjs/collection/async-iterable-collection/_shared/async-map-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-merge-iterable.js +2 -11
- package/dist/cjs/collection/async-iterable-collection/_shared/async-merge-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-partion-iterable.js +9 -18
- package/dist/cjs/collection/async-iterable-collection/_shared/async-partion-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-repeat-iterable.js +4 -13
- package/dist/cjs/collection/async-iterable-collection/_shared/async-repeat-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-skip-iterable.js +3 -12
- package/dist/cjs/collection/async-iterable-collection/_shared/async-skip-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-skip-until-iterable.js +7 -16
- package/dist/cjs/collection/async-iterable-collection/_shared/async-skip-until-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-sliding-iterable.js +9 -18
- package/dist/cjs/collection/async-iterable-collection/_shared/async-sliding-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-split-iterable.js +17 -26
- package/dist/cjs/collection/async-iterable-collection/_shared/async-split-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-take-iterable.js +3 -12
- package/dist/cjs/collection/async-iterable-collection/_shared/async-take-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-take-until-iterable.js +4 -13
- package/dist/cjs/collection/async-iterable-collection/_shared/async-take-until-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-tap-iterable.js +2 -11
- package/dist/cjs/collection/async-iterable-collection/_shared/async-tap-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-unique-iterable.js +6 -15
- package/dist/cjs/collection/async-iterable-collection/_shared/async-unique-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-update-iterable.js +5 -14
- package/dist/cjs/collection/async-iterable-collection/_shared/async-update-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-when-iterable.js +4 -13
- package/dist/cjs/collection/async-iterable-collection/_shared/async-when-iterable.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-collection.js +177 -265
- package/dist/cjs/collection/async-iterable-collection/async-iterable-collection.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/chunk-iterable.js +14 -23
- package/dist/cjs/collection/iterable-collection/_shared/chunk-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/chunk-while-iterable.js +12 -21
- package/dist/cjs/collection/iterable-collection/_shared/chunk-while-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/collapse-iterable.js +5 -14
- package/dist/cjs/collection/iterable-collection/_shared/collapse-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/count-by-iterable.js +9 -18
- package/dist/cjs/collection/iterable-collection/_shared/count-by-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/cross-join-iterable.js +19 -31
- package/dist/cjs/collection/iterable-collection/_shared/cross-join-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/entries-iterable.js +4 -13
- package/dist/cjs/collection/iterable-collection/_shared/entries-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/filter-iterable.js +3 -12
- package/dist/cjs/collection/iterable-collection/_shared/filter-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/flat-map-iterable.js +2 -11
- package/dist/cjs/collection/iterable-collection/_shared/flat-map-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/group-by-iterable.js +9 -18
- package/dist/cjs/collection/iterable-collection/_shared/group-by-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/insert-after-iterable.js +6 -16
- package/dist/cjs/collection/iterable-collection/_shared/insert-after-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/insert-before-iterable.js +6 -16
- package/dist/cjs/collection/iterable-collection/_shared/insert-before-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/map-iterable.js +2 -11
- package/dist/cjs/collection/iterable-collection/_shared/map-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/merge-iterable.js +2 -11
- package/dist/cjs/collection/iterable-collection/_shared/merge-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/pad-end-iterable.js +11 -20
- package/dist/cjs/collection/iterable-collection/_shared/pad-end-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/pad-start-iterable.js +11 -20
- package/dist/cjs/collection/iterable-collection/_shared/pad-start-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/partion-iterable.js +9 -18
- package/dist/cjs/collection/iterable-collection/_shared/partion-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/repeat-iterable.js +4 -13
- package/dist/cjs/collection/iterable-collection/_shared/repeat-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/reverse-iterable.js +4 -13
- package/dist/cjs/collection/iterable-collection/_shared/reverse-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/shuffle-iterable.js +9 -18
- package/dist/cjs/collection/iterable-collection/_shared/shuffle-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/skip-iterable.js +3 -12
- package/dist/cjs/collection/iterable-collection/_shared/skip-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/skip-until-iterable.js +6 -15
- package/dist/cjs/collection/iterable-collection/_shared/skip-until-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/slice-iterable.js +15 -24
- package/dist/cjs/collection/iterable-collection/_shared/slice-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/sliding-iterable.js +9 -18
- package/dist/cjs/collection/iterable-collection/_shared/sliding-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/sort-iterable.js +1 -10
- package/dist/cjs/collection/iterable-collection/_shared/sort-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/split-iterable.js +17 -26
- package/dist/cjs/collection/iterable-collection/_shared/split-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/take-iterable.js +3 -12
- package/dist/cjs/collection/iterable-collection/_shared/take-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/take-until-iterable.js +4 -13
- package/dist/cjs/collection/iterable-collection/_shared/take-until-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/tap-iterable.js +2 -11
- package/dist/cjs/collection/iterable-collection/_shared/tap-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/unique-iterable.js +6 -15
- package/dist/cjs/collection/iterable-collection/_shared/unique-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/update-iterable.js +5 -14
- package/dist/cjs/collection/iterable-collection/_shared/update-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/when-iterable.js +4 -13
- package/dist/cjs/collection/iterable-collection/_shared/when-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/zip-iterable.js +6 -15
- package/dist/cjs/collection/iterable-collection/_shared/zip-iterable.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/iterable-collection.js +154 -346
- package/dist/cjs/collection/iterable-collection/iterable-collection.js.map +1 -1
- package/dist/cjs/collection/list-collection/list-collection.js +348 -931
- package/dist/cjs/collection/list-collection/list-collection.js.map +1 -1
- package/dist/cjs/storage/storage.js +25 -15
- package/dist/cjs/storage/storage.js.map +1 -1
- package/dist/cjs/utilities/_module.js +18 -0
- package/dist/cjs/utilities/_module.js.map +1 -0
- package/dist/cjs/utilities/time-span/_module.js +18 -0
- package/dist/cjs/utilities/time-span/_module.js.map +1 -0
- package/dist/cjs/utilities/time-span/time-span.js +103 -0
- package/dist/cjs/utilities/time-span/time-span.js.map +1 -0
- package/dist/esm/_module.js +2 -0
- package/dist/esm/_module.js.map +1 -1
- package/dist/esm/async/_module.js +12 -0
- package/dist/esm/async/_module.js.map +1 -0
- package/dist/esm/async/_shared.js +27 -0
- package/dist/esm/async/_shared.js.map +1 -0
- package/dist/esm/async/abortable/_module.js +2 -0
- package/dist/esm/async/abortable/_module.js.map +1 -0
- package/dist/esm/async/abortable/abortable.js +45 -0
- package/dist/esm/async/abortable/abortable.js.map +1 -0
- package/dist/esm/async/abortable-iterable/_module.js +2 -0
- package/dist/esm/async/abortable-iterable/_module.js.map +1 -0
- package/dist/esm/async/abortable-iterable/abortable-iterable.js +29 -0
- package/dist/esm/async/abortable-iterable/abortable-iterable.js.map +1 -0
- package/dist/esm/async/backof-policies/_module.js +5 -0
- package/dist/esm/async/backof-policies/_module.js.map +1 -0
- package/dist/esm/async/backof-policies/_shared.js +4 -0
- package/dist/esm/async/backof-policies/_shared.js.map +1 -0
- package/dist/esm/async/backof-policies/constant-backoff-policy/_module.js +2 -0
- package/dist/esm/async/backof-policies/constant-backoff-policy/_module.js.map +1 -0
- package/dist/esm/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js +16 -0
- package/dist/esm/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +1 -0
- package/dist/esm/async/backof-policies/exponential-backoff-policy/_module.js +2 -0
- package/dist/esm/async/backof-policies/exponential-backoff-policy/_module.js.map +1 -0
- package/dist/esm/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js +20 -0
- package/dist/esm/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +1 -0
- package/dist/esm/async/backof-policies/linear-backoff-policy/_module.js +2 -0
- package/dist/esm/async/backof-policies/linear-backoff-policy/_module.js.map +1 -0
- package/dist/esm/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js +20 -0
- package/dist/esm/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +1 -0
- package/dist/esm/async/backof-policies/polynomial-backoff-policy/_module.js +2 -0
- package/dist/esm/async/backof-policies/polynomial-backoff-policy/_module.js.map +1 -0
- package/dist/esm/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js +20 -0
- package/dist/esm/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +1 -0
- package/dist/esm/async/delay/_module.js +2 -0
- package/dist/esm/async/delay/_module.js.map +1 -0
- package/dist/esm/async/delay/delay.js +21 -0
- package/dist/esm/async/delay/delay.js.map +1 -0
- package/dist/esm/async/delay-iterable/_module.js +2 -0
- package/dist/esm/async/delay-iterable/_module.js.map +1 -0
- package/dist/esm/async/delay-iterable/delay-iterable.js +33 -0
- package/dist/esm/async/delay-iterable/delay-iterable.js.map +1 -0
- package/dist/esm/async/lazy-promise/_module.js +2 -0
- package/dist/esm/async/lazy-promise/_module.js.map +1 -0
- package/dist/esm/async/lazy-promise/lazy-promise.js +17 -0
- package/dist/esm/async/lazy-promise/lazy-promise.js.map +1 -0
- package/dist/esm/async/retry/_module.js +2 -0
- package/dist/esm/async/retry/_module.js.map +1 -0
- package/dist/esm/async/retry/retry.js +40 -0
- package/dist/esm/async/retry/retry.js.map +1 -0
- package/dist/esm/async/retry-iterable/_module.js +2 -0
- package/dist/esm/async/retry-iterable/_module.js.map +1 -0
- package/dist/esm/async/retry-iterable/retry-iterable.js +29 -0
- package/dist/esm/async/retry-iterable/retry-iterable.js.map +1 -0
- package/dist/esm/async/timeout/_module.js +2 -0
- package/dist/esm/async/timeout/_module.js.map +1 -0
- package/dist/esm/async/timeout/timeout.js +25 -0
- package/dist/esm/async/timeout/timeout.js.map +1 -0
- package/dist/esm/async/timeout-iterable/_module.js +2 -0
- package/dist/esm/async/timeout-iterable/_module.js.map +1 -0
- package/dist/esm/async/timeout-iterable/timeout-iterable.js +8 -0
- package/dist/esm/async/timeout-iterable/timeout-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_shared/_module.js +1 -3
- package/dist/esm/collection/async-iterable-collection/_shared/_module.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-chunk-iterable.js +14 -23
- package/dist/esm/collection/async-iterable-collection/_shared/async-chunk-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-chunk-while-iterable.js +12 -21
- package/dist/esm/collection/async-iterable-collection/_shared/async-chunk-while-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-collapse-iterable.js +5 -14
- package/dist/esm/collection/async-iterable-collection/_shared/async-collapse-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-count-by-iterable.js +9 -18
- package/dist/esm/collection/async-iterable-collection/_shared/async-count-by-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-cross-join-iterable.js +17 -26
- package/dist/esm/collection/async-iterable-collection/_shared/async-cross-join-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-error-handler-iterable.js +27 -0
- package/dist/esm/collection/async-iterable-collection/_shared/async-error-handler-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_shared/async-filter-iterable.js +3 -12
- package/dist/esm/collection/async-iterable-collection/_shared/async-filter-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-flat-map-iterable.js +2 -11
- package/dist/esm/collection/async-iterable-collection/_shared/async-flat-map-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-insert-after-iterable.js +8 -17
- package/dist/esm/collection/async-iterable-collection/_shared/async-insert-after-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-insert-before-iterable.js +8 -17
- package/dist/esm/collection/async-iterable-collection/_shared/async-insert-before-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-map-iterable.js +2 -11
- package/dist/esm/collection/async-iterable-collection/_shared/async-map-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-merge-iterable.js +2 -11
- package/dist/esm/collection/async-iterable-collection/_shared/async-merge-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-partion-iterable.js +9 -18
- package/dist/esm/collection/async-iterable-collection/_shared/async-partion-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-repeat-iterable.js +4 -13
- package/dist/esm/collection/async-iterable-collection/_shared/async-repeat-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-skip-iterable.js +3 -12
- package/dist/esm/collection/async-iterable-collection/_shared/async-skip-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-skip-until-iterable.js +7 -16
- package/dist/esm/collection/async-iterable-collection/_shared/async-skip-until-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-sliding-iterable.js +9 -18
- package/dist/esm/collection/async-iterable-collection/_shared/async-sliding-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-split-iterable.js +17 -26
- package/dist/esm/collection/async-iterable-collection/_shared/async-split-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-take-iterable.js +3 -12
- package/dist/esm/collection/async-iterable-collection/_shared/async-take-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-take-until-iterable.js +4 -13
- package/dist/esm/collection/async-iterable-collection/_shared/async-take-until-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-tap-iterable.js +2 -11
- package/dist/esm/collection/async-iterable-collection/_shared/async-tap-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-unique-iterable.js +6 -15
- package/dist/esm/collection/async-iterable-collection/_shared/async-unique-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-update-iterable.js +5 -14
- package/dist/esm/collection/async-iterable-collection/_shared/async-update-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-when-iterable.js +4 -13
- package/dist/esm/collection/async-iterable-collection/_shared/async-when-iterable.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-collection.js +179 -267
- package/dist/esm/collection/async-iterable-collection/async-iterable-collection.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/chunk-iterable.js +14 -23
- package/dist/esm/collection/iterable-collection/_shared/chunk-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/chunk-while-iterable.js +12 -21
- package/dist/esm/collection/iterable-collection/_shared/chunk-while-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/collapse-iterable.js +5 -14
- package/dist/esm/collection/iterable-collection/_shared/collapse-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/count-by-iterable.js +9 -18
- package/dist/esm/collection/iterable-collection/_shared/count-by-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/cross-join-iterable.js +19 -31
- package/dist/esm/collection/iterable-collection/_shared/cross-join-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/entries-iterable.js +4 -13
- package/dist/esm/collection/iterable-collection/_shared/entries-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/filter-iterable.js +3 -12
- package/dist/esm/collection/iterable-collection/_shared/filter-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/flat-map-iterable.js +2 -11
- package/dist/esm/collection/iterable-collection/_shared/flat-map-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/group-by-iterable.js +9 -18
- package/dist/esm/collection/iterable-collection/_shared/group-by-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/insert-after-iterable.js +6 -16
- package/dist/esm/collection/iterable-collection/_shared/insert-after-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/insert-before-iterable.js +6 -16
- package/dist/esm/collection/iterable-collection/_shared/insert-before-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/map-iterable.js +2 -11
- package/dist/esm/collection/iterable-collection/_shared/map-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/merge-iterable.js +2 -11
- package/dist/esm/collection/iterable-collection/_shared/merge-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/pad-end-iterable.js +11 -20
- package/dist/esm/collection/iterable-collection/_shared/pad-end-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/pad-start-iterable.js +11 -20
- package/dist/esm/collection/iterable-collection/_shared/pad-start-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/partion-iterable.js +9 -18
- package/dist/esm/collection/iterable-collection/_shared/partion-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/repeat-iterable.js +4 -13
- package/dist/esm/collection/iterable-collection/_shared/repeat-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/reverse-iterable.js +4 -13
- package/dist/esm/collection/iterable-collection/_shared/reverse-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/shuffle-iterable.js +9 -18
- package/dist/esm/collection/iterable-collection/_shared/shuffle-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/skip-iterable.js +3 -12
- package/dist/esm/collection/iterable-collection/_shared/skip-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/skip-until-iterable.js +6 -15
- package/dist/esm/collection/iterable-collection/_shared/skip-until-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/slice-iterable.js +15 -24
- package/dist/esm/collection/iterable-collection/_shared/slice-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/sliding-iterable.js +9 -18
- package/dist/esm/collection/iterable-collection/_shared/sliding-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/sort-iterable.js +1 -10
- package/dist/esm/collection/iterable-collection/_shared/sort-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/split-iterable.js +17 -26
- package/dist/esm/collection/iterable-collection/_shared/split-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/take-iterable.js +3 -12
- package/dist/esm/collection/iterable-collection/_shared/take-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/take-until-iterable.js +4 -13
- package/dist/esm/collection/iterable-collection/_shared/take-until-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/tap-iterable.js +2 -11
- package/dist/esm/collection/iterable-collection/_shared/tap-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/unique-iterable.js +6 -15
- package/dist/esm/collection/iterable-collection/_shared/unique-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/update-iterable.js +5 -14
- package/dist/esm/collection/iterable-collection/_shared/update-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/when-iterable.js +4 -13
- package/dist/esm/collection/iterable-collection/_shared/when-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/zip-iterable.js +6 -15
- package/dist/esm/collection/iterable-collection/_shared/zip-iterable.js.map +1 -1
- package/dist/esm/collection/iterable-collection/iterable-collection.js +155 -347
- package/dist/esm/collection/iterable-collection/iterable-collection.js.map +1 -1
- package/dist/esm/collection/list-collection/list-collection.js +349 -932
- package/dist/esm/collection/list-collection/list-collection.js.map +1 -1
- package/dist/esm/storage/storage.js +25 -15
- package/dist/esm/storage/storage.js.map +1 -1
- package/dist/esm/utilities/_module.js +2 -0
- package/dist/esm/utilities/_module.js.map +1 -0
- package/dist/esm/utilities/time-span/_module.js +2 -0
- package/dist/esm/utilities/time-span/_module.js.map +1 -0
- package/dist/esm/utilities/time-span/time-span.js +99 -0
- package/dist/esm/utilities/time-span/time-span.js.map +1 -0
- package/dist/types/_module.d.ts +2 -0
- package/dist/types/_shared/types.d.ts +2 -2
- package/dist/types/async/_module.d.ts +11 -0
- package/dist/types/async/_shared.d.ts +35 -0
- package/dist/types/async/abortable/_module.d.ts +1 -0
- package/dist/types/async/abortable/abortable.d.ts +39 -0
- package/dist/types/async/abortable-iterable/_module.d.ts +1 -0
- package/dist/types/async/abortable-iterable/abortable-iterable.d.ts +36 -0
- package/dist/types/async/backof-policies/_module.d.ts +5 -0
- package/dist/types/async/backof-policies/_shared.d.ts +12 -0
- package/dist/types/async/backof-policies/constant-backoff-policy/_module.d.ts +1 -0
- package/dist/types/async/backof-policies/constant-backoff-policy/constant-backoff-policy.d.ts +28 -0
- package/dist/types/async/backof-policies/exponential-backoff-policy/_module.d.ts +1 -0
- package/dist/types/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.d.ts +36 -0
- package/dist/types/async/backof-policies/linear-backoff-policy/_module.d.ts +1 -0
- package/dist/types/async/backof-policies/linear-backoff-policy/linear-backoff-policy.d.ts +32 -0
- package/dist/types/async/backof-policies/polynomial-backoff-policy/_module.d.ts +1 -0
- package/dist/types/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.d.ts +36 -0
- package/dist/types/async/delay/_module.d.ts +1 -0
- package/dist/types/async/delay/delay.d.ts +38 -0
- package/dist/types/async/delay-iterable/_module.d.ts +1 -0
- package/dist/types/async/delay-iterable/delay-iterable.d.ts +57 -0
- package/dist/types/async/lazy-promise/_module.d.ts +1 -0
- package/dist/types/async/lazy-promise/lazy-promise.d.ts +28 -0
- package/dist/types/async/retry/_module.d.ts +1 -0
- package/dist/types/async/retry/retry.d.ts +86 -0
- package/dist/types/async/retry-iterable/_module.d.ts +1 -0
- package/dist/types/async/retry-iterable/retry-iterable.d.ts +86 -0
- package/dist/types/async/timeout/_module.d.ts +1 -0
- package/dist/types/async/timeout/timeout.d.ts +40 -0
- package/dist/types/async/timeout-iterable/_module.d.ts +1 -0
- package/dist/types/async/timeout-iterable/timeout-iterable.d.ts +64 -0
- package/dist/types/collection/async-iterable-collection/_shared/_module.d.ts +1 -3
- package/dist/types/collection/async-iterable-collection/_shared/async-error-handler-iterable.d.ts +6 -0
- package/dist/types/collection/async-iterable-collection/_shared/async-when-iterable.d.ts +1 -1
- package/dist/types/collection/async-iterable-collection/async-iterable-collection.d.ts +39 -37
- package/dist/types/contracts/collection/_shared.d.ts +7 -7
- package/dist/types/contracts/collection/async-collection.contract.d.ts +51 -39
- package/dist/types/contracts/storage/storage.contract.d.ts +2 -1
- package/dist/types/storage/storage.d.ts +5 -3
- package/dist/types/utilities/_module.d.ts +1 -0
- package/dist/types/utilities/time-span/_module.d.ts +1 -0
- package/dist/types/utilities/time-span/time-span.d.ts +50 -0
- package/package.json +1 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-abort-iterable.js +0 -25
- package/dist/cjs/collection/async-iterable-collection/_shared/async-abort-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-delay-iterable.js +0 -25
- package/dist/cjs/collection/async-iterable-collection/_shared/async-delay-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/_shared/async-timeout-iterable.js +0 -21
- package/dist/cjs/collection/async-iterable-collection/_shared/async-timeout-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-abort-iterable.js +0 -21
- package/dist/esm/collection/async-iterable-collection/_shared/async-abort-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-delay-iterable.js +0 -21
- package/dist/esm/collection/async-iterable-collection/_shared/async-delay-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/_shared/async-timeout-iterable.js +0 -17
- package/dist/esm/collection/async-iterable-collection/_shared/async-timeout-iterable.js.map +0 -1
- package/dist/types/collection/async-iterable-collection/_shared/async-abort-iterable.d.ts +0 -10
- package/dist/types/collection/async-iterable-collection/_shared/async-delay-iterable.d.ts +0 -10
- package/dist/types/collection/async-iterable-collection/_shared/async-timeout-iterable.d.ts +0 -10
package/dist/esm/collection/async-iterable-collection/_shared/async-collapse-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-collapse-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-collapse-iterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"async-collapse-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-collapse-iterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AASnE,MAAM,OAAO,qBAAqB;IAGV;IAApB,YAAoB,UAAoC;QAApC,eAAU,GAAV,UAAU,CAA0B;IAAG,CAAC;IAE5D,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACvC,IAAI,UAAU,CAAS,IAAI,CAAC,IAAI,eAAe,CAAS,IAAI,CAAC,EAAE,CAAC;gBAE5D,KAAK,CAAC,CAAC,IAAW,CAAC;YACvB,CAAC;iBAAM,CAAC;gBACJ,MAAM,IAA6B,CAAC;YACxC,CAAC;QACL,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class AsyncCountByIterable {
|
|
3
2
|
collection;
|
|
4
3
|
callback;
|
|
@@ -7,26 +6,18 @@ export class AsyncCountByIterable {
|
|
|
7
6
|
this.callback = callback;
|
|
8
7
|
}
|
|
9
8
|
async *[Symbol.asyncIterator]() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
map.set(key, 0);
|
|
16
|
-
}
|
|
17
|
-
const counter = map.get(key);
|
|
18
|
-
if (counter !== undefined) {
|
|
19
|
-
map.set(key, counter + 1);
|
|
20
|
-
}
|
|
9
|
+
const map = new Map();
|
|
10
|
+
for await (const [index, item] of this.collection.entries()) {
|
|
11
|
+
const key = await this.callback(item, index, this.collection);
|
|
12
|
+
if (!map.has(key)) {
|
|
13
|
+
map.set(key, 0);
|
|
21
14
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (error instanceof CollectionError) {
|
|
26
|
-
throw error;
|
|
15
|
+
const counter = map.get(key);
|
|
16
|
+
if (counter !== undefined) {
|
|
17
|
+
map.set(key, counter + 1);
|
|
27
18
|
}
|
|
28
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
29
19
|
}
|
|
20
|
+
yield* map;
|
|
30
21
|
}
|
|
31
22
|
}
|
|
32
23
|
//# sourceMappingURL=async-count-by-iterable.js.map
|
package/dist/esm/collection/async-iterable-collection/_shared/async-count-by-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-count-by-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-count-by-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"async-count-by-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-count-by-iterable.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,oBAAoB;IAIjB;IACA;IAFZ,YACY,UAAoC,EACpC,WAIJ,CAAC,IAAI,EAAE,EAAE,CAET,IAAW;QAPP,eAAU,GAAV,UAAU,CAA0B;QACpC,aAAQ,GAAR,QAAQ,CAMD;IAChB,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QAGzB,MAAM,GAAG,GAAG,IAAI,GAAG,EAAmB,CAAC;QACvC,IAAI,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YAC1D,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;YAC9D,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBAChB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACpB,CAAC;YACD,MAAM,OAAO,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBACxB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC;YAC9B,CAAC;QACL,CAAC;QACD,KAAK,CAAC,CAAC,GAAG,CAAC;IACf,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
import { isIterable } from "../../../collection/_module";
|
|
3
2
|
export class AsyncCrossJoinIterable {
|
|
4
3
|
collection;
|
|
@@ -10,31 +9,23 @@ export class AsyncCrossJoinIterable {
|
|
|
10
9
|
this.makeCollection = makeCollection;
|
|
11
10
|
}
|
|
12
11
|
async *[Symbol.asyncIterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
yield* combinations;
|
|
31
|
-
}
|
|
32
|
-
catch (error) {
|
|
33
|
-
if (error instanceof CollectionError) {
|
|
34
|
-
throw error;
|
|
35
|
-
}
|
|
36
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
37
|
-
}
|
|
12
|
+
const combinations = (await this.makeCollection([
|
|
13
|
+
this.collection,
|
|
14
|
+
this.makeCollection(this.iterable),
|
|
15
|
+
]).reduce(async (a, b) => {
|
|
16
|
+
return await a
|
|
17
|
+
.map((x) => {
|
|
18
|
+
return b.map((y) => {
|
|
19
|
+
return [...x, y];
|
|
20
|
+
});
|
|
21
|
+
})
|
|
22
|
+
.reduce((c, b) => c.append(b), this.makeCollection([]));
|
|
23
|
+
}, this.makeCollection([[]]))).map((combination) => {
|
|
24
|
+
return combination.reduce((a, b) => {
|
|
25
|
+
return [...a, ...(isIterable(b) ? b : [b])];
|
|
26
|
+
}, []);
|
|
27
|
+
});
|
|
28
|
+
yield* combinations;
|
|
38
29
|
}
|
|
39
30
|
}
|
|
40
31
|
//# sourceMappingURL=async-cross-join-iterable.js.map
|
package/dist/esm/collection/async-iterable-collection/_shared/async-cross-join-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-cross-join-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-cross-join-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"async-cross-join-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-cross-join-iterable.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAKlD,MAAM,OAAO,sBAAsB;IAInB;IACA;IACA;IAHZ,YACY,UAAoC,EACpC,QAAuC,EACvC,cAEqB;QAJrB,eAAU,GAAV,UAAU,CAA0B;QACpC,aAAQ,GAAR,QAAQ,CAA+B;QACvC,mBAAc,GAAd,cAAc,CAEO;IAC9B,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QAGzB,MAAM,YAAY,GAAG,CACjB,MAAM,IAAI,CAAC,cAAc,CAAC;YACtB,IAAI,CAAC,UAAU;YACf,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC;SACK,CAAC,CAAC,MAAM,CAG/C,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE;YACX,OAAO,MAAM,CAAC;iBACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;gBACP,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;oBACf,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;gBACrB,CAAC,CAAC,CAAC;YACP,CAAC,CAAC;iBACD,MAAM,CACH,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EACrB,IAAI,CAAC,cAAc,CAA4B,EAAE,CAAC,CACrD,CAAC;QACV,CAAC,EACD,IAAI,CAAC,cAAc,CAAC,CAAC,EAA+B,CAAC,CAAC,CACzD,CACJ,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;YAElB,OAAO,WAAW,CAAC,MAAM,CAA4B,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;gBAC1D,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAEzC,CAAC;YACN,CAAC,EAAE,EAAE,CAAC,CAAC;QACX,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,CAAC,YAEN,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export class AsyncErrorHandlerIterable {
|
|
2
|
+
iterable;
|
|
3
|
+
errorPasser;
|
|
4
|
+
constructor(iterable, errorPasser) {
|
|
5
|
+
this.iterable = iterable;
|
|
6
|
+
this.errorPasser = errorPasser;
|
|
7
|
+
}
|
|
8
|
+
async *[Symbol.asyncIterator]() {
|
|
9
|
+
const iterator = this.iterable[Symbol.asyncIterator]();
|
|
10
|
+
try {
|
|
11
|
+
while (true) {
|
|
12
|
+
const result = await iterator.next();
|
|
13
|
+
if (result.done) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
yield result.value;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
if (this.errorPasser(error)) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
throw error;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=async-error-handler-iterable.js.map
|
package/dist/esm/collection/async-iterable-collection/_shared/async-error-handler-iterable.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async-error-handler-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-error-handler-iterable.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,yBAAyB;IAIb;IACA;IAFrB,YACqB,QAA+B,EAC/B,WAAwC;QADxC,aAAQ,GAAR,QAAQ,CAAuB;QAC/B,gBAAW,GAAX,WAAW,CAA6B;IAC1D,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,CAAC;YAED,OAAO,IAAI,EAAE,CAAC;gBACV,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACrC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;oBACd,OAAO;gBACX,CAAC;gBACD,MAAM,MAAM,CAAC,KAAK,CAAC;YACvB,CAAC;QACL,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACtB,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC1B,OAAO;YACX,CAAC;YACD,MAAM,KAAK,CAAC;QAChB,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class AsyncFilterIterable {
|
|
3
2
|
collection;
|
|
4
3
|
predicateFn;
|
|
@@ -7,19 +6,11 @@ export class AsyncFilterIterable {
|
|
|
7
6
|
this.predicateFn = predicateFn;
|
|
8
7
|
}
|
|
9
8
|
async *[Symbol.asyncIterator]() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
yield item;
|
|
14
|
-
}
|
|
9
|
+
for await (const [index, item] of this.collection.entries()) {
|
|
10
|
+
if (await this.predicateFn(item, index, this.collection)) {
|
|
11
|
+
yield item;
|
|
15
12
|
}
|
|
16
13
|
}
|
|
17
|
-
catch (error) {
|
|
18
|
-
if (error instanceof CollectionError) {
|
|
19
|
-
throw error;
|
|
20
|
-
}
|
|
21
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
22
|
-
}
|
|
23
14
|
}
|
|
24
15
|
}
|
|
25
16
|
//# sourceMappingURL=async-filter-iterable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-filter-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-filter-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"async-filter-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-filter-iterable.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,mBAAmB;IAIhB;IACA;IAFZ,YACY,UAAoC,EACpC,WAIP;QALO,eAAU,GAAV,UAAU,CAA0B;QACpC,gBAAW,GAAX,WAAW,CAIlB;IACF,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YAC1D,IAAI,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;gBACvD,MAAM,IAAe,CAAC;YAC1B,CAAC;QACL,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class AsyncFlatMapIterable {
|
|
3
2
|
collection;
|
|
4
3
|
mapFn;
|
|
@@ -7,16 +6,8 @@ export class AsyncFlatMapIterable {
|
|
|
7
6
|
this.mapFn = mapFn;
|
|
8
7
|
}
|
|
9
8
|
async *[Symbol.asyncIterator]() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
yield* await this.mapFn(item, index, this.collection);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
catch (error) {
|
|
16
|
-
if (error instanceof CollectionError) {
|
|
17
|
-
throw error;
|
|
18
|
-
}
|
|
19
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
9
|
+
for await (const [index, item] of this.collection.entries()) {
|
|
10
|
+
yield* await this.mapFn(item, index, this.collection);
|
|
20
11
|
}
|
|
21
12
|
}
|
|
22
13
|
}
|
package/dist/esm/collection/async-iterable-collection/_shared/async-flat-map-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-flat-map-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-flat-map-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"async-flat-map-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-flat-map-iterable.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,oBAAoB;IAIjB;IACA;IAFZ,YACY,UAAoC,EACpC,KAIP;QALO,eAAU,GAAV,UAAU,CAA0B;QACpC,UAAK,GAAL,KAAK,CAIZ;IACF,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YAC1D,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC1D,CAAC;IACL,CAAC;CACJ"}
|
package/dist/esm/collection/async-iterable-collection/_shared/async-insert-after-iterable.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class AsyncInsertAfterIterable {
|
|
3
2
|
collection;
|
|
4
3
|
predicateFn;
|
|
@@ -9,23 +8,15 @@ export class AsyncInsertAfterIterable {
|
|
|
9
8
|
this.iterable = iterable;
|
|
10
9
|
}
|
|
11
10
|
async *[Symbol.asyncIterator]() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
hasMatched = true;
|
|
20
|
-
}
|
|
21
|
-
index++;
|
|
11
|
+
let hasMatched = false, index = 0;
|
|
12
|
+
for await (const item of this.collection) {
|
|
13
|
+
yield item;
|
|
14
|
+
if (!hasMatched &&
|
|
15
|
+
(await this.predicateFn(item, index, this.collection))) {
|
|
16
|
+
yield* this.iterable;
|
|
17
|
+
hasMatched = true;
|
|
22
18
|
}
|
|
23
|
-
|
|
24
|
-
catch (error) {
|
|
25
|
-
if (error instanceof CollectionError) {
|
|
26
|
-
throw error;
|
|
27
|
-
}
|
|
28
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
19
|
+
index++;
|
|
29
20
|
}
|
|
30
21
|
}
|
|
31
22
|
}
|
package/dist/esm/collection/async-iterable-collection/_shared/async-insert-after-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-insert-after-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-insert-after-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"async-insert-after-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-insert-after-iterable.ts"],"names":[],"mappings":"AASA,MAAM,OAAO,wBAAwB;IAIrB;IACA;IACA;IAHZ,YACY,UAAoC,EACpC,WAA6D,EAC7D,QAAgD;QAFhD,eAAU,GAAV,UAAU,CAA0B;QACpC,gBAAW,GAAX,WAAW,CAAkD;QAC7D,aAAQ,GAAR,QAAQ,CAAwC;IACzD,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,UAAU,GAAG,KAAK,EAClB,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACvC,MAAM,IAAI,CAAC;YACX,IACI,CAAC,UAAU;gBACX,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,EACxD,CAAC;gBACC,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;gBACrB,UAAU,GAAG,IAAI,CAAC;YACtB,CAAC;YACD,KAAK,EAAE,CAAC;QACZ,CAAC;IACL,CAAC;CACJ"}
|
package/dist/esm/collection/async-iterable-collection/_shared/async-insert-before-iterable.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class AsyncInsertBeforeIterable {
|
|
3
2
|
collection;
|
|
4
3
|
predicateFn;
|
|
@@ -9,23 +8,15 @@ export class AsyncInsertBeforeIterable {
|
|
|
9
8
|
this.iterable = iterable;
|
|
10
9
|
}
|
|
11
10
|
async *[Symbol.asyncIterator]() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
hasMatched = true;
|
|
19
|
-
}
|
|
20
|
-
yield item;
|
|
21
|
-
index++;
|
|
11
|
+
let hasMatched = false, index = 0;
|
|
12
|
+
for await (const item of this.collection) {
|
|
13
|
+
if (!hasMatched &&
|
|
14
|
+
(await this.predicateFn(item, index, this.collection))) {
|
|
15
|
+
yield* this.iterable;
|
|
16
|
+
hasMatched = true;
|
|
22
17
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (error instanceof CollectionError) {
|
|
26
|
-
throw error;
|
|
27
|
-
}
|
|
28
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
18
|
+
yield item;
|
|
19
|
+
index++;
|
|
29
20
|
}
|
|
30
21
|
}
|
|
31
22
|
}
|
package/dist/esm/collection/async-iterable-collection/_shared/async-insert-before-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-insert-before-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-insert-before-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"async-insert-before-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-insert-before-iterable.ts"],"names":[],"mappings":"AASA,MAAM,OAAO,yBAAyB;IAItB;IACA;IACA;IAHZ,YACY,UAAoC,EACpC,WAA6D,EAC7D,QAAgD;QAFhD,eAAU,GAAV,UAAU,CAA0B;QACpC,gBAAW,GAAX,WAAW,CAAkD;QAC7D,aAAQ,GAAR,QAAQ,CAAwC;IACzD,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,UAAU,GAAG,KAAK,EAClB,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACvC,IACI,CAAC,UAAU;gBACX,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,EACxD,CAAC;gBACC,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;gBACrB,UAAU,GAAG,IAAI,CAAC;YACtB,CAAC;YACD,MAAM,IAAI,CAAC;YACX,KAAK,EAAE,CAAC;QACZ,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class AsyncMapIterable {
|
|
3
2
|
collection;
|
|
4
3
|
mapFn;
|
|
@@ -7,16 +6,8 @@ export class AsyncMapIterable {
|
|
|
7
6
|
this.mapFn = mapFn;
|
|
8
7
|
}
|
|
9
8
|
async *[Symbol.asyncIterator]() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
yield this.mapFn(item, index, this.collection);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
catch (error) {
|
|
16
|
-
if (error instanceof CollectionError) {
|
|
17
|
-
throw error;
|
|
18
|
-
}
|
|
19
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
9
|
+
for await (const [index, item] of this.collection.entries()) {
|
|
10
|
+
yield this.mapFn(item, index, this.collection);
|
|
20
11
|
}
|
|
21
12
|
}
|
|
22
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-map-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-map-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"async-map-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-map-iterable.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,gBAAgB;IAIb;IACA;IAFZ,YACY,UAAoC,EACpC,KAA0D;QAD1D,eAAU,GAAV,UAAU,CAA0B;QACpC,UAAK,GAAL,KAAK,CAAqD;IACnE,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YAC1D,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACnD,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class AsyncMergeIterable {
|
|
3
2
|
iterableA;
|
|
4
3
|
iterableB;
|
|
@@ -7,16 +6,8 @@ export class AsyncMergeIterable {
|
|
|
7
6
|
this.iterableB = iterableB;
|
|
8
7
|
}
|
|
9
8
|
async *[Symbol.asyncIterator]() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
yield* this.iterableB;
|
|
13
|
-
}
|
|
14
|
-
catch (error) {
|
|
15
|
-
if (error instanceof CollectionError) {
|
|
16
|
-
throw error;
|
|
17
|
-
}
|
|
18
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
19
|
-
}
|
|
9
|
+
yield* this.iterableA;
|
|
10
|
+
yield* this.iterableB;
|
|
20
11
|
}
|
|
21
12
|
}
|
|
22
13
|
//# sourceMappingURL=async-merge-iterable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-merge-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-merge-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"async-merge-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-merge-iterable.ts"],"names":[],"mappings":"AAMA,MAAM,OAAO,kBAAkB;IAIf;IACA;IAFZ,YACY,SAAqC,EACrC,SAAwC;QADxC,cAAS,GAAT,SAAS,CAA4B;QACrC,cAAS,GAAT,SAAS,CAA+B;IACjD,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;QACtB,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class AsyncPartionIterable {
|
|
3
2
|
collection;
|
|
4
3
|
predicateFn;
|
|
@@ -9,26 +8,18 @@ export class AsyncPartionIterable {
|
|
|
9
8
|
this.makeCollection = makeCollection;
|
|
10
9
|
}
|
|
11
10
|
async *[Symbol.asyncIterator]() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
arrayA.push(item);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
arrayB.push(item);
|
|
21
|
-
}
|
|
11
|
+
const arrayA = [];
|
|
12
|
+
const arrayB = [];
|
|
13
|
+
for await (const [index, item] of this.collection.entries()) {
|
|
14
|
+
if (await this.predicateFn(item, index, this.collection)) {
|
|
15
|
+
arrayA.push(item);
|
|
22
16
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
catch (error) {
|
|
27
|
-
if (error instanceof CollectionError) {
|
|
28
|
-
throw error;
|
|
17
|
+
else {
|
|
18
|
+
arrayB.push(item);
|
|
29
19
|
}
|
|
30
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
31
20
|
}
|
|
21
|
+
yield this.makeCollection(arrayA);
|
|
22
|
+
yield this.makeCollection(arrayB);
|
|
32
23
|
}
|
|
33
24
|
}
|
|
34
25
|
//# sourceMappingURL=async-partion-iterable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-partion-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-partion-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"async-partion-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-partion-iterable.ts"],"names":[],"mappings":"AASA,MAAM,OAAO,oBAAoB;IAIjB;IACA;IACA;IAHZ,YACY,UAAoC,EACpC,WAA6D,EAC7D,cAEqB;QAJrB,eAAU,GAAV,UAAU,CAA0B;QACpC,gBAAW,GAAX,WAAW,CAAkD;QAC7D,mBAAc,GAAd,cAAc,CAEO;IAC9B,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,IAAI,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YAC1D,IAAI,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;gBACvD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC;iBAAM,CAAC;gBACJ,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC;QACL,CAAC;QACD,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAClC,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class AsyncRepeatIterable {
|
|
3
2
|
collection;
|
|
4
3
|
amount;
|
|
@@ -9,19 +8,11 @@ export class AsyncRepeatIterable {
|
|
|
9
8
|
this.makeAsyncCollection = makeAsyncCollection;
|
|
10
9
|
}
|
|
11
10
|
async *[Symbol.asyncIterator]() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
collection = collection.append(this.collection);
|
|
16
|
-
}
|
|
17
|
-
yield* collection;
|
|
18
|
-
}
|
|
19
|
-
catch (error) {
|
|
20
|
-
if (error instanceof CollectionError) {
|
|
21
|
-
throw error;
|
|
22
|
-
}
|
|
23
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
11
|
+
let collection = this.makeAsyncCollection([]);
|
|
12
|
+
for (let index = 0; index < this.amount; index++) {
|
|
13
|
+
collection = collection.append(this.collection);
|
|
24
14
|
}
|
|
15
|
+
yield* collection;
|
|
25
16
|
}
|
|
26
17
|
}
|
|
27
18
|
//# sourceMappingURL=async-repeat-iterable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-repeat-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-repeat-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"async-repeat-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-repeat-iterable.ts"],"names":[],"mappings":"AAMA,MAAM,OAAO,mBAAmB;IAEhB;IACA;IACA;IAHZ,YACY,UAAoC,EACpC,MAAc,EACd,mBAEqB;QAJrB,eAAU,GAAV,UAAU,CAA0B;QACpC,WAAM,GAAN,MAAM,CAAQ;QACd,wBAAmB,GAAnB,mBAAmB,CAEE;IAC9B,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAS,EAAE,CAAC,CAAC;QACtD,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;YAC/C,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACpD,CAAC;QACD,KAAK,CAAC,CAAC,UAAU,CAAC;IACtB,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class AsyncSkipIterable {
|
|
3
2
|
collection;
|
|
4
3
|
limit;
|
|
@@ -7,18 +6,10 @@ export class AsyncSkipIterable {
|
|
|
7
6
|
this.limit = limit;
|
|
8
7
|
}
|
|
9
8
|
async *[Symbol.asyncIterator]() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
this.limit = (await this.collection.size()) + this.limit;
|
|
13
|
-
}
|
|
14
|
-
yield* this.collection.skipWhile((_item, index) => index < this.limit);
|
|
15
|
-
}
|
|
16
|
-
catch (error) {
|
|
17
|
-
if (error instanceof CollectionError) {
|
|
18
|
-
throw error;
|
|
19
|
-
}
|
|
20
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
9
|
+
if (this.limit < 0) {
|
|
10
|
+
this.limit = (await this.collection.size()) + this.limit;
|
|
21
11
|
}
|
|
12
|
+
yield* this.collection.skipWhile((_item, index) => index < this.limit);
|
|
22
13
|
}
|
|
23
14
|
}
|
|
24
15
|
//# sourceMappingURL=async-skip-iterable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-skip-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-skip-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"async-skip-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-skip-iterable.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,iBAAiB;IAEd;IACA;IAFZ,YACY,UAAoC,EACpC,KAAa;QADb,eAAU,GAAV,UAAU,CAA0B;QACpC,UAAK,GAAL,KAAK,CAAQ;IACtB,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC;YACjB,IAAI,CAAC,KAAK,GAAG,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7D,CAAC;QACD,KAAK,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3E,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class AsyncSkipUntilIterable {
|
|
3
2
|
collection;
|
|
4
3
|
predicateFn;
|
|
@@ -7,23 +6,15 @@ export class AsyncSkipUntilIterable {
|
|
|
7
6
|
this.predicateFn = predicateFn;
|
|
8
7
|
}
|
|
9
8
|
async *[Symbol.asyncIterator]() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
hasMatched = await this.predicateFn(item, index, this.collection);
|
|
15
|
-
}
|
|
16
|
-
if (hasMatched) {
|
|
17
|
-
yield item;
|
|
18
|
-
}
|
|
19
|
-
index++;
|
|
9
|
+
let hasMatched = false, index = 0;
|
|
10
|
+
for await (const item of this.collection) {
|
|
11
|
+
if (!hasMatched) {
|
|
12
|
+
hasMatched = await this.predicateFn(item, index, this.collection);
|
|
20
13
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (error instanceof CollectionError) {
|
|
24
|
-
throw error;
|
|
14
|
+
if (hasMatched) {
|
|
15
|
+
yield item;
|
|
25
16
|
}
|
|
26
|
-
|
|
17
|
+
index++;
|
|
27
18
|
}
|
|
28
19
|
}
|
|
29
20
|
}
|
package/dist/esm/collection/async-iterable-collection/_shared/async-skip-until-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-skip-until-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-skip-until-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"async-skip-until-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-skip-until-iterable.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,sBAAsB;IAEnB;IACA;IAFZ,YACY,UAAoC,EACpC,WAA6D;QAD7D,eAAU,GAAV,UAAU,CAA0B;QACpC,gBAAW,GAAX,WAAW,CAAkD;IACtE,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,UAAU,GAAG,KAAK,EAClB,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACvC,IAAI,CAAC,UAAU,EAAE,CAAC;gBACd,UAAU,GAAG,MAAM,IAAI,CAAC,WAAW,CAC/B,IAAI,EACJ,KAAK,EACL,IAAI,CAAC,UAAU,CAClB,CAAC;YACN,CAAC;YACD,IAAI,UAAU,EAAE,CAAC;gBACb,MAAM,IAAI,CAAC;YACf,CAAC;YACD,KAAK,EAAE,CAAC;QACZ,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class AsyncSlidingIteralbe {
|
|
3
2
|
collection;
|
|
4
3
|
chunkSize;
|
|
@@ -9,25 +8,17 @@ export class AsyncSlidingIteralbe {
|
|
|
9
8
|
this.step = step;
|
|
10
9
|
}
|
|
11
10
|
async *[Symbol.asyncIterator]() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const size = await this.collection.size();
|
|
17
|
-
for (let index = 0; index < size; index += this.step) {
|
|
18
|
-
const start = index;
|
|
19
|
-
const end = index + this.chunkSize;
|
|
20
|
-
yield this.collection.slice(start, end);
|
|
21
|
-
if (end >= size) {
|
|
22
|
-
break;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
11
|
+
if (this.step <= 0) {
|
|
12
|
+
return;
|
|
25
13
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
14
|
+
const size = await this.collection.size();
|
|
15
|
+
for (let index = 0; index < size; index += this.step) {
|
|
16
|
+
const start = index;
|
|
17
|
+
const end = index + this.chunkSize;
|
|
18
|
+
yield this.collection.slice(start, end);
|
|
19
|
+
if (end >= size) {
|
|
20
|
+
break;
|
|
29
21
|
}
|
|
30
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
31
22
|
}
|
|
32
23
|
}
|
|
33
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-sliding-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-sliding-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"async-sliding-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-sliding-iterable.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,oBAAoB;IAIjB;IACA;IACA;IAHZ,YACY,UAAoC,EACpC,SAAiB,EACjB,IAAY;QAFZ,eAAU,GAAV,UAAU,CAA0B;QACpC,cAAS,GAAT,SAAS,CAAQ;QACjB,SAAI,GAAJ,IAAI,CAAQ;IACrB,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC;YACjB,OAAO;QACX,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QAE1C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACnD,MAAM,KAAK,GAAG,KAAK,CAAC;YACpB,MAAM,GAAG,GAAG,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC;YAEnC,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YAExC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;gBACd,MAAM;YACV,CAAC;QACL,CAAC;IACL,CAAC;CACJ"}
|