@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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncFilterIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncFilterIterable {
|
|
6
5
|
collection;
|
|
7
6
|
predicateFn;
|
|
@@ -10,19 +9,11 @@ class AsyncFilterIterable {
|
|
|
10
9
|
this.predicateFn = predicateFn;
|
|
11
10
|
}
|
|
12
11
|
async *[Symbol.asyncIterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
yield item;
|
|
17
|
-
}
|
|
12
|
+
for await (const [index, item] of this.collection.entries()) {
|
|
13
|
+
if (await this.predicateFn(item, index, this.collection)) {
|
|
14
|
+
yield item;
|
|
18
15
|
}
|
|
19
16
|
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
if (error instanceof _module_1.CollectionError) {
|
|
22
|
-
throw error;
|
|
23
|
-
}
|
|
24
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
25
|
-
}
|
|
26
17
|
}
|
|
27
18
|
}
|
|
28
19
|
exports.AsyncFilterIterable = AsyncFilterIterable;
|
|
@@ -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,MAAa,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;AAnBD,kDAmBC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncFlatMapIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncFlatMapIterable {
|
|
6
5
|
collection;
|
|
7
6
|
mapFn;
|
|
@@ -10,16 +9,8 @@ class AsyncFlatMapIterable {
|
|
|
10
9
|
this.mapFn = mapFn;
|
|
11
10
|
}
|
|
12
11
|
async *[Symbol.asyncIterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
yield* await this.mapFn(item, index, this.collection);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
catch (error) {
|
|
19
|
-
if (error instanceof _module_1.CollectionError) {
|
|
20
|
-
throw error;
|
|
21
|
-
}
|
|
22
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
12
|
+
for await (const [index, item] of this.collection.entries()) {
|
|
13
|
+
yield* await this.mapFn(item, index, this.collection);
|
|
23
14
|
}
|
|
24
15
|
}
|
|
25
16
|
}
|
package/dist/cjs/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,MAAa,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;AAjBD,oDAiBC"}
|
package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-after-iterable.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncInsertAfterIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncInsertAfterIterable {
|
|
6
5
|
collection;
|
|
7
6
|
predicateFn;
|
|
@@ -12,23 +11,15 @@ class AsyncInsertAfterIterable {
|
|
|
12
11
|
this.iterable = iterable;
|
|
13
12
|
}
|
|
14
13
|
async *[Symbol.asyncIterator]() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
hasMatched = true;
|
|
23
|
-
}
|
|
24
|
-
index++;
|
|
14
|
+
let hasMatched = false, index = 0;
|
|
15
|
+
for await (const item of this.collection) {
|
|
16
|
+
yield item;
|
|
17
|
+
if (!hasMatched &&
|
|
18
|
+
(await this.predicateFn(item, index, this.collection))) {
|
|
19
|
+
yield* this.iterable;
|
|
20
|
+
hasMatched = true;
|
|
25
21
|
}
|
|
26
|
-
|
|
27
|
-
catch (error) {
|
|
28
|
-
if (error instanceof _module_1.CollectionError) {
|
|
29
|
-
throw error;
|
|
30
|
-
}
|
|
31
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
22
|
+
index++;
|
|
32
23
|
}
|
|
33
24
|
}
|
|
34
25
|
}
|
package/dist/cjs/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,MAAa,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;AAxBD,4DAwBC"}
|
package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-before-iterable.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncInsertBeforeIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncInsertBeforeIterable {
|
|
6
5
|
collection;
|
|
7
6
|
predicateFn;
|
|
@@ -12,23 +11,15 @@ class AsyncInsertBeforeIterable {
|
|
|
12
11
|
this.iterable = iterable;
|
|
13
12
|
}
|
|
14
13
|
async *[Symbol.asyncIterator]() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
hasMatched = true;
|
|
22
|
-
}
|
|
23
|
-
yield item;
|
|
24
|
-
index++;
|
|
14
|
+
let hasMatched = false, index = 0;
|
|
15
|
+
for await (const item of this.collection) {
|
|
16
|
+
if (!hasMatched &&
|
|
17
|
+
(await this.predicateFn(item, index, this.collection))) {
|
|
18
|
+
yield* this.iterable;
|
|
19
|
+
hasMatched = true;
|
|
25
20
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if (error instanceof _module_1.CollectionError) {
|
|
29
|
-
throw error;
|
|
30
|
-
}
|
|
31
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
21
|
+
yield item;
|
|
22
|
+
index++;
|
|
32
23
|
}
|
|
33
24
|
}
|
|
34
25
|
}
|
package/dist/cjs/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,MAAa,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;AAxBD,8DAwBC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncMapIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncMapIterable {
|
|
6
5
|
collection;
|
|
7
6
|
mapFn;
|
|
@@ -10,16 +9,8 @@ class AsyncMapIterable {
|
|
|
10
9
|
this.mapFn = mapFn;
|
|
11
10
|
}
|
|
12
11
|
async *[Symbol.asyncIterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
yield this.mapFn(item, index, this.collection);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
catch (error) {
|
|
19
|
-
if (error instanceof _module_1.CollectionError) {
|
|
20
|
-
throw error;
|
|
21
|
-
}
|
|
22
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
12
|
+
for await (const [index, item] of this.collection.entries()) {
|
|
13
|
+
yield this.mapFn(item, index, this.collection);
|
|
23
14
|
}
|
|
24
15
|
}
|
|
25
16
|
}
|
|
@@ -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,MAAa,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;AAbD,4CAaC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncMergeIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncMergeIterable {
|
|
6
5
|
iterableA;
|
|
7
6
|
iterableB;
|
|
@@ -10,16 +9,8 @@ class AsyncMergeIterable {
|
|
|
10
9
|
this.iterableB = iterableB;
|
|
11
10
|
}
|
|
12
11
|
async *[Symbol.asyncIterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
yield* this.iterableB;
|
|
16
|
-
}
|
|
17
|
-
catch (error) {
|
|
18
|
-
if (error instanceof _module_1.CollectionError) {
|
|
19
|
-
throw error;
|
|
20
|
-
}
|
|
21
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
22
|
-
}
|
|
12
|
+
yield* this.iterableA;
|
|
13
|
+
yield* this.iterableB;
|
|
23
14
|
}
|
|
24
15
|
}
|
|
25
16
|
exports.AsyncMergeIterable = AsyncMergeIterable;
|
|
@@ -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,MAAa,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;AAZD,gDAYC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncPartionIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncPartionIterable {
|
|
6
5
|
collection;
|
|
7
6
|
predicateFn;
|
|
@@ -12,26 +11,18 @@ class AsyncPartionIterable {
|
|
|
12
11
|
this.makeCollection = makeCollection;
|
|
13
12
|
}
|
|
14
13
|
async *[Symbol.asyncIterator]() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
arrayA.push(item);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
arrayB.push(item);
|
|
24
|
-
}
|
|
14
|
+
const arrayA = [];
|
|
15
|
+
const arrayB = [];
|
|
16
|
+
for await (const [index, item] of this.collection.entries()) {
|
|
17
|
+
if (await this.predicateFn(item, index, this.collection)) {
|
|
18
|
+
arrayA.push(item);
|
|
25
19
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
catch (error) {
|
|
30
|
-
if (error instanceof _module_1.CollectionError) {
|
|
31
|
-
throw error;
|
|
20
|
+
else {
|
|
21
|
+
arrayB.push(item);
|
|
32
22
|
}
|
|
33
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
34
23
|
}
|
|
24
|
+
yield this.makeCollection(arrayA);
|
|
25
|
+
yield this.makeCollection(arrayB);
|
|
35
26
|
}
|
|
36
27
|
}
|
|
37
28
|
exports.AsyncPartionIterable = AsyncPartionIterable;
|
|
@@ -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,MAAa,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;AAxBD,oDAwBC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncRepeatIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncRepeatIterable {
|
|
6
5
|
collection;
|
|
7
6
|
amount;
|
|
@@ -12,19 +11,11 @@ class AsyncRepeatIterable {
|
|
|
12
11
|
this.makeAsyncCollection = makeAsyncCollection;
|
|
13
12
|
}
|
|
14
13
|
async *[Symbol.asyncIterator]() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
collection = collection.append(this.collection);
|
|
19
|
-
}
|
|
20
|
-
yield* collection;
|
|
21
|
-
}
|
|
22
|
-
catch (error) {
|
|
23
|
-
if (error instanceof _module_1.CollectionError) {
|
|
24
|
-
throw error;
|
|
25
|
-
}
|
|
26
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
14
|
+
let collection = this.makeAsyncCollection([]);
|
|
15
|
+
for (let index = 0; index < this.amount; index++) {
|
|
16
|
+
collection = collection.append(this.collection);
|
|
27
17
|
}
|
|
18
|
+
yield* collection;
|
|
28
19
|
}
|
|
29
20
|
}
|
|
30
21
|
exports.AsyncRepeatIterable = AsyncRepeatIterable;
|
|
@@ -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,MAAa,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;AAhBD,kDAgBC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncSkipIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncSkipIterable {
|
|
6
5
|
collection;
|
|
7
6
|
limit;
|
|
@@ -10,18 +9,10 @@ class AsyncSkipIterable {
|
|
|
10
9
|
this.limit = limit;
|
|
11
10
|
}
|
|
12
11
|
async *[Symbol.asyncIterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
this.limit = (await this.collection.size()) + this.limit;
|
|
16
|
-
}
|
|
17
|
-
yield* this.collection.skipWhile((_item, index) => index < this.limit);
|
|
18
|
-
}
|
|
19
|
-
catch (error) {
|
|
20
|
-
if (error instanceof _module_1.CollectionError) {
|
|
21
|
-
throw error;
|
|
22
|
-
}
|
|
23
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
12
|
+
if (this.limit < 0) {
|
|
13
|
+
this.limit = (await this.collection.size()) + this.limit;
|
|
24
14
|
}
|
|
15
|
+
yield* this.collection.skipWhile((_item, index) => index < this.limit);
|
|
25
16
|
}
|
|
26
17
|
}
|
|
27
18
|
exports.AsyncSkipIterable = AsyncSkipIterable;
|
|
@@ -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,MAAa,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;AAZD,8CAYC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncSkipUntilIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncSkipUntilIterable {
|
|
6
5
|
collection;
|
|
7
6
|
predicateFn;
|
|
@@ -10,23 +9,15 @@ class AsyncSkipUntilIterable {
|
|
|
10
9
|
this.predicateFn = predicateFn;
|
|
11
10
|
}
|
|
12
11
|
async *[Symbol.asyncIterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
hasMatched = await this.predicateFn(item, index, this.collection);
|
|
18
|
-
}
|
|
19
|
-
if (hasMatched) {
|
|
20
|
-
yield item;
|
|
21
|
-
}
|
|
22
|
-
index++;
|
|
12
|
+
let hasMatched = false, index = 0;
|
|
13
|
+
for await (const item of this.collection) {
|
|
14
|
+
if (!hasMatched) {
|
|
15
|
+
hasMatched = await this.predicateFn(item, index, this.collection);
|
|
23
16
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (error instanceof _module_1.CollectionError) {
|
|
27
|
-
throw error;
|
|
17
|
+
if (hasMatched) {
|
|
18
|
+
yield item;
|
|
28
19
|
}
|
|
29
|
-
|
|
20
|
+
index++;
|
|
30
21
|
}
|
|
31
22
|
}
|
|
32
23
|
}
|
package/dist/cjs/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,MAAa,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;AAvBD,wDAuBC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncSlidingIteralbe = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncSlidingIteralbe {
|
|
6
5
|
collection;
|
|
7
6
|
chunkSize;
|
|
@@ -12,25 +11,17 @@ class AsyncSlidingIteralbe {
|
|
|
12
11
|
this.step = step;
|
|
13
12
|
}
|
|
14
13
|
async *[Symbol.asyncIterator]() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const size = await this.collection.size();
|
|
20
|
-
for (let index = 0; index < size; index += this.step) {
|
|
21
|
-
const start = index;
|
|
22
|
-
const end = index + this.chunkSize;
|
|
23
|
-
yield this.collection.slice(start, end);
|
|
24
|
-
if (end >= size) {
|
|
25
|
-
break;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
14
|
+
if (this.step <= 0) {
|
|
15
|
+
return;
|
|
28
16
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
const size = await this.collection.size();
|
|
18
|
+
for (let index = 0; index < size; index += this.step) {
|
|
19
|
+
const start = index;
|
|
20
|
+
const end = index + this.chunkSize;
|
|
21
|
+
yield this.collection.slice(start, end);
|
|
22
|
+
if (end >= size) {
|
|
23
|
+
break;
|
|
32
24
|
}
|
|
33
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
34
25
|
}
|
|
35
26
|
}
|
|
36
27
|
}
|
|
@@ -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,MAAa,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;AA1BD,oDA0BC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncSplitIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncSplitIterable {
|
|
6
5
|
collection;
|
|
7
6
|
chunkAmount;
|
|
@@ -12,34 +11,26 @@ class AsyncSplitIterable {
|
|
|
12
11
|
this.makeCollection = makeCollection;
|
|
13
12
|
}
|
|
14
13
|
async *[Symbol.asyncIterator]() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
chunkSizes[chunkIndex] = chunkSizes[chunkIndex] + 1;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
const iterator = this.collection.toIterator();
|
|
26
|
-
const array = [];
|
|
27
|
-
for (const chunkSize of chunkSizes) {
|
|
28
|
-
for (let i = 0; i < chunkSize; i++) {
|
|
29
|
-
const item = await iterator.next();
|
|
30
|
-
if (item.value !== undefined) {
|
|
31
|
-
array.push(item.value);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
yield this.makeCollection(array);
|
|
35
|
-
array.length = 0;
|
|
14
|
+
const size = await this.collection.size(), minChunkSize = Math.floor(size / this.chunkAmount), restSize = size % this.chunkAmount, chunkSizes = Array.from({
|
|
15
|
+
length: this.chunkAmount,
|
|
16
|
+
}).fill(minChunkSize);
|
|
17
|
+
for (let i = 1; i <= restSize; i++) {
|
|
18
|
+
const chunkIndex = (i - 1) % this.chunkAmount;
|
|
19
|
+
if (chunkSizes[chunkIndex]) {
|
|
20
|
+
chunkSizes[chunkIndex] = chunkSizes[chunkIndex] + 1;
|
|
36
21
|
}
|
|
37
22
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
23
|
+
const iterator = this.collection.toIterator();
|
|
24
|
+
const array = [];
|
|
25
|
+
for (const chunkSize of chunkSizes) {
|
|
26
|
+
for (let i = 0; i < chunkSize; i++) {
|
|
27
|
+
const item = await iterator.next();
|
|
28
|
+
if (item.value !== undefined) {
|
|
29
|
+
array.push(item.value);
|
|
30
|
+
}
|
|
41
31
|
}
|
|
42
|
-
|
|
32
|
+
yield this.makeCollection(array);
|
|
33
|
+
array.length = 0;
|
|
43
34
|
}
|
|
44
35
|
}
|
|
45
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-split-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-split-iterable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"async-split-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-split-iterable.ts"],"names":[],"mappings":";;;AAMA,MAAa,kBAAkB;IAIf;IACA;IAEA;IAJZ,YACY,UAAoC,EACpC,WAAmB,EAEnB,cAEqB;QALrB,eAAU,GAAV,UAAU,CAA0B;QACpC,gBAAW,GAAX,WAAW,CAAQ;QAEnB,mBAAc,GAAd,cAAc,CAEO;IAC9B,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,EACrC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,EAClD,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC,WAAW,EAClC,UAAU,GAAG,KAAK,CAAC,IAAI,CAAS;YAC5B,MAAM,EAAE,IAAI,CAAC,WAAW;SAC3B,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAE1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC;YACjC,MAAM,UAAU,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;YAC9C,IAAI,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;gBACzB,UAAU,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YACxD,CAAC;QACL,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC;gBACjC,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACnC,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;oBAC3B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAC3B,CAAC;YACL,CAAC;YACD,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;YACjC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QACrB,CAAC;IACL,CAAC;CACJ;AAxCD,gDAwCC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncTakeIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncTakeIterable {
|
|
6
5
|
collection;
|
|
7
6
|
limit;
|
|
@@ -10,18 +9,10 @@ class AsyncTakeIterable {
|
|
|
10
9
|
this.limit = limit;
|
|
11
10
|
}
|
|
12
11
|
async *[Symbol.asyncIterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
this.limit = (await this.collection.size()) + this.limit;
|
|
16
|
-
}
|
|
17
|
-
yield* this.collection.takeWhile((_item, index) => index < this.limit);
|
|
18
|
-
}
|
|
19
|
-
catch (error) {
|
|
20
|
-
if (error instanceof _module_1.CollectionError) {
|
|
21
|
-
throw error;
|
|
22
|
-
}
|
|
23
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
12
|
+
if (this.limit < 0) {
|
|
13
|
+
this.limit = (await this.collection.size()) + this.limit;
|
|
24
14
|
}
|
|
15
|
+
yield* this.collection.takeWhile((_item, index) => index < this.limit);
|
|
25
16
|
}
|
|
26
17
|
}
|
|
27
18
|
exports.AsyncTakeIterable = AsyncTakeIterable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-take-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-take-iterable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"async-take-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-take-iterable.ts"],"names":[],"mappings":";;;AAKA,MAAa,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;AAZD,8CAYC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncTakeUntilIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncTakeUntilIterable {
|
|
6
5
|
collection;
|
|
7
6
|
predicateFn;
|
|
@@ -10,19 +9,11 @@ class AsyncTakeUntilIterable {
|
|
|
10
9
|
this.predicateFn = predicateFn;
|
|
11
10
|
}
|
|
12
11
|
async *[Symbol.asyncIterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
break;
|
|
17
|
-
}
|
|
18
|
-
yield item;
|
|
12
|
+
for await (const [index, item] of this.collection.entries()) {
|
|
13
|
+
if (await this.predicateFn(item, index, this.collection)) {
|
|
14
|
+
break;
|
|
19
15
|
}
|
|
20
|
-
|
|
21
|
-
catch (error) {
|
|
22
|
-
if (error instanceof _module_1.CollectionError) {
|
|
23
|
-
throw error;
|
|
24
|
-
}
|
|
25
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
16
|
+
yield item;
|
|
26
17
|
}
|
|
27
18
|
}
|
|
28
19
|
}
|
package/dist/cjs/collection/async-iterable-collection/_shared/async-take-until-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-take-until-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-take-until-iterable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"async-take-until-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-take-until-iterable.ts"],"names":[],"mappings":";;;AAQA,MAAa,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,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;YACV,CAAC;YACD,MAAM,IAAI,CAAC;QACf,CAAC;IACL,CAAC;CACJ;AAdD,wDAcC"}
|