@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,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class MapIterable {
|
|
3
2
|
collection;
|
|
4
3
|
mapFn;
|
|
@@ -7,16 +6,8 @@ export class MapIterable {
|
|
|
7
6
|
this.mapFn = mapFn;
|
|
8
7
|
}
|
|
9
8
|
*[Symbol.iterator]() {
|
|
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 (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":"map-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/map-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"map-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/map-iterable.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,WAAW;IAER;IACA;IAFZ,YACY,UAA+B,EAC/B,KAAgD;QADhD,eAAU,GAAV,UAAU,CAAqB;QAC/B,UAAK,GAAL,KAAK,CAA2C;IACzD,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,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 MergeIterable {
|
|
3
2
|
iterableA;
|
|
4
3
|
iterableB;
|
|
@@ -7,16 +6,8 @@ export class MergeIterable {
|
|
|
7
6
|
this.iterableB = iterableB;
|
|
8
7
|
}
|
|
9
8
|
*[Symbol.iterator]() {
|
|
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=merge-iterable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/merge-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"merge-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/merge-iterable.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,aAAa;IAIV;IACA;IAFZ,YACY,SAA2B,EAC3B,SAA8B;QAD9B,cAAS,GAAT,SAAS,CAAkB;QAC3B,cAAS,GAAT,SAAS,CAAqB;IACvC,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,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 PadEndIterable {
|
|
3
2
|
collection;
|
|
4
3
|
maxLength;
|
|
@@ -11,26 +10,18 @@ export class PadEndIterable {
|
|
|
11
10
|
this.makeCollection = makeCollection;
|
|
12
11
|
}
|
|
13
12
|
*[Symbol.iterator]() {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
resultCollection = resultCollection.append(fillCollections);
|
|
22
|
-
}
|
|
23
|
-
const restAmount = this.maxLength - (repeat * fillSize + size);
|
|
24
|
-
resultCollection = resultCollection.append(fillCollections.slice(0, restAmount));
|
|
25
|
-
resultCollection = resultCollection.prepend(this.collection);
|
|
26
|
-
yield* resultCollection;
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
if (error instanceof CollectionError) {
|
|
30
|
-
throw error;
|
|
31
|
-
}
|
|
32
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
13
|
+
const fillCollections = this.makeCollection(this.fillItems);
|
|
14
|
+
const fillSize = fillCollections.size();
|
|
15
|
+
const size = this.collection.size();
|
|
16
|
+
const repeat = Math.floor((this.maxLength - size) / fillSize);
|
|
17
|
+
let resultCollection = this.makeCollection([]);
|
|
18
|
+
for (let index = 0; index < repeat; index++) {
|
|
19
|
+
resultCollection = resultCollection.append(fillCollections);
|
|
33
20
|
}
|
|
21
|
+
const restAmount = this.maxLength - (repeat * fillSize + size);
|
|
22
|
+
resultCollection = resultCollection.append(fillCollections.slice(0, restAmount));
|
|
23
|
+
resultCollection = resultCollection.prepend(this.collection);
|
|
24
|
+
yield* resultCollection;
|
|
34
25
|
}
|
|
35
26
|
}
|
|
36
27
|
//# sourceMappingURL=pad-end-iterable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pad-end-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/pad-end-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pad-end-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/pad-end-iterable.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,cAAc;IAIX;IACA;IACA;IACA;IAJZ,YACY,UAA+B,EAC/B,SAAiB,EACjB,SAA8B,EAC9B,cAE4B;QAL5B,eAAU,GAAV,UAAU,CAAqB;QAC/B,cAAS,GAAT,SAAS,CAAQ;QACjB,cAAS,GAAT,SAAS,CAAqB;QAC9B,mBAAc,GAAd,cAAc,CAEc;IACrC,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAS,IAAI,CAAC,SAAS,CAAC,CAAC;QACpE,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAI,EAAE,CAAC;QACxC,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QACpC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;QAC9D,IAAI,gBAAgB,GAChB,IAAI,CAAC,cAAc,CAAS,EAAE,CAAC,CAAC;QACpC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;YAC1C,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;QAChE,CAAC;QACD,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,GAAG,CAAC,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC,CAAC;QAC/D,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,CACtC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CACvC,CAAC;QACF,gBAAgB,GAAG,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC7D,KAAK,CAAC,CAAC,gBAAgB,CAAC;IAC5B,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class PadStartIterable {
|
|
3
2
|
collection;
|
|
4
3
|
maxLength;
|
|
@@ -11,26 +10,18 @@ export class PadStartIterable {
|
|
|
11
10
|
this.makeCollection = makeCollection;
|
|
12
11
|
}
|
|
13
12
|
*[Symbol.iterator]() {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
resultCollection = resultCollection.append(fillCollections);
|
|
22
|
-
}
|
|
23
|
-
const restAmount = this.maxLength - (repeat * fillSize + size);
|
|
24
|
-
resultCollection = resultCollection.append(fillCollections.slice(0, restAmount));
|
|
25
|
-
resultCollection = resultCollection.append(this.collection);
|
|
26
|
-
yield* resultCollection;
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
if (error instanceof CollectionError) {
|
|
30
|
-
throw error;
|
|
31
|
-
}
|
|
32
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
13
|
+
const fillCollections = this.makeCollection(this.fillItems);
|
|
14
|
+
const fillSize = fillCollections.size();
|
|
15
|
+
const size = this.collection.size();
|
|
16
|
+
const repeat = Math.floor((this.maxLength - size) / fillSize);
|
|
17
|
+
let resultCollection = this.makeCollection([]);
|
|
18
|
+
for (let index = 0; index < repeat; index++) {
|
|
19
|
+
resultCollection = resultCollection.append(fillCollections);
|
|
33
20
|
}
|
|
21
|
+
const restAmount = this.maxLength - (repeat * fillSize + size);
|
|
22
|
+
resultCollection = resultCollection.append(fillCollections.slice(0, restAmount));
|
|
23
|
+
resultCollection = resultCollection.append(this.collection);
|
|
24
|
+
yield* resultCollection;
|
|
34
25
|
}
|
|
35
26
|
}
|
|
36
27
|
//# sourceMappingURL=pad-start-iterable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pad-start-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/pad-start-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pad-start-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/pad-start-iterable.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,gBAAgB;IAIb;IACA;IACA;IACA;IAJZ,YACY,UAA+B,EAC/B,SAAiB,EACjB,SAA8B,EAC9B,cAE4B;QAL5B,eAAU,GAAV,UAAU,CAAqB;QAC/B,cAAS,GAAT,SAAS,CAAQ;QACjB,cAAS,GAAT,SAAS,CAAqB;QAC9B,mBAAc,GAAd,cAAc,CAEc;IACrC,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAS,IAAI,CAAC,SAAS,CAAC,CAAC;QACpE,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAI,EAAE,CAAC;QACxC,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QACpC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;QAC9D,IAAI,gBAAgB,GAChB,IAAI,CAAC,cAAc,CAAS,EAAE,CAAC,CAAC;QACpC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;YAC1C,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;QAChE,CAAC;QACD,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,GAAG,CAAC,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC,CAAC;QAC/D,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,CACtC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CACvC,CAAC;QACF,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC5D,KAAK,CAAC,CAAC,gBAAgB,CAAC;IAC5B,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class PartionIterable {
|
|
3
2
|
collection;
|
|
4
3
|
predicateFn;
|
|
@@ -9,26 +8,18 @@ export class PartionIterable {
|
|
|
9
8
|
this.makeCollection = makeCollection;
|
|
10
9
|
}
|
|
11
10
|
*[Symbol.iterator]() {
|
|
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 (const [index, item] of this.collection.entries()) {
|
|
14
|
+
if (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=partion-iterable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partion-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/partion-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"partion-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/partion-iterable.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,eAAe;IAEZ;IACA;IAEA;IAJZ,YACY,UAA+B,EAC/B,WAAmD,EAEnD,cAEgB;QALhB,eAAU,GAAV,UAAU,CAAqB;QAC/B,gBAAW,GAAX,WAAW,CAAwC;QAEnD,mBAAc,GAAd,cAAc,CAEE;IACzB,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;gBACjD,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 RepeatIterable {
|
|
3
2
|
collection;
|
|
4
3
|
amount;
|
|
@@ -9,19 +8,11 @@ export class RepeatIterable {
|
|
|
9
8
|
this.makeCollection = makeCollection;
|
|
10
9
|
}
|
|
11
10
|
*[Symbol.iterator]() {
|
|
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.makeCollection([]);
|
|
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=repeat-iterable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repeat-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/repeat-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"repeat-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/repeat-iterable.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,cAAc;IAEX;IACA;IACA;IAHZ,YACY,UAA+B,EAC/B,MAAc,EACd,cAEgB;QAJhB,eAAU,GAAV,UAAU,CAAqB;QAC/B,WAAM,GAAN,MAAM,CAAQ;QACd,mBAAc,GAAd,cAAc,CAEE;IACzB,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,IAAI,UAAU,GAAG,IAAI,CAAC,cAAc,CAAS,EAAE,CAAC,CAAC;QACjD,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 ReverseIterable {
|
|
3
2
|
collection;
|
|
4
3
|
chunkSize;
|
|
@@ -9,18 +8,10 @@ export class ReverseIterable {
|
|
|
9
8
|
this.makeCollection = makeCollection;
|
|
10
9
|
}
|
|
11
10
|
*[Symbol.iterator]() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
.reduce((collection, item) => collection.prepend(item), this.makeCollection([]));
|
|
17
|
-
}
|
|
18
|
-
catch (error) {
|
|
19
|
-
if (error instanceof CollectionError) {
|
|
20
|
-
throw error;
|
|
21
|
-
}
|
|
22
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
23
|
-
}
|
|
11
|
+
yield* this.collection
|
|
12
|
+
.chunk(this.chunkSize)
|
|
13
|
+
.map((item) => this.makeCollection([...item].reverse()))
|
|
14
|
+
.reduce((collection, item) => collection.prepend(item), this.makeCollection([]));
|
|
24
15
|
}
|
|
25
16
|
}
|
|
26
17
|
//# sourceMappingURL=reverse-iterable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reverse-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/reverse-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reverse-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/reverse-iterable.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,eAAe;IAEZ;IACA;IAEA;IAJZ,YACY,UAA+B,EAC/B,SAAiB,EAEjB,cAEgB;QALhB,eAAU,GAAV,UAAU,CAAqB;QAC/B,cAAS,GAAT,SAAS,CAAQ;QAEjB,mBAAc,GAAd,cAAc,CAEE;IACzB,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,KAAK,CAAC,CAAC,IAAI,CAAC,UAAU;aACjB,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;aACrB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAS,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;aAC/D,MAAM,CACH,CAAC,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,EAC9C,IAAI,CAAC,cAAc,CAAS,EAAE,CAAC,CAClC,CAAC;IACV,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_shared";
|
|
2
1
|
export class ShuffleIterable {
|
|
3
2
|
iterable;
|
|
4
3
|
mathRandom;
|
|
@@ -7,26 +6,18 @@ export class ShuffleIterable {
|
|
|
7
6
|
this.mathRandom = mathRandom;
|
|
8
7
|
}
|
|
9
8
|
*[Symbol.iterator]() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
newArray[i] = newArray[j];
|
|
17
|
-
}
|
|
18
|
-
if (temp !== undefined) {
|
|
19
|
-
newArray[j] = temp;
|
|
20
|
-
}
|
|
9
|
+
const newArray = [...this.iterable];
|
|
10
|
+
for (let i = newArray.length - 1; i > 0; i--) {
|
|
11
|
+
const j = Math.floor(this.mathRandom() * (i + 1));
|
|
12
|
+
const temp = newArray[i];
|
|
13
|
+
if (newArray[j] !== undefined) {
|
|
14
|
+
newArray[i] = newArray[j];
|
|
21
15
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
catch (error) {
|
|
25
|
-
if (error instanceof CollectionError) {
|
|
26
|
-
throw error;
|
|
16
|
+
if (temp !== undefined) {
|
|
17
|
+
newArray[j] = temp;
|
|
27
18
|
}
|
|
28
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
29
19
|
}
|
|
20
|
+
yield* newArray;
|
|
30
21
|
}
|
|
31
22
|
}
|
|
32
23
|
//# sourceMappingURL=shuffle-iterable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shuffle-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/shuffle-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shuffle-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/shuffle-iterable.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,eAAe;IAEZ;IACS;IAFrB,YACY,QAA0B,EACjB,UAAwB;QADjC,aAAQ,GAAR,QAAQ,CAAkB;QACjB,eAAU,GAAV,UAAU,CAAc;IAC1C,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpC,KAAK,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC3C,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAClD,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YACzB,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;gBAC5B,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC9B,CAAC;YACD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACrB,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;YACvB,CAAC;QACL,CAAC;QACD,KAAK,CAAC,CAAC,QAAQ,CAAC;IACpB,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class SkipIterable {
|
|
3
2
|
collection;
|
|
4
3
|
offset;
|
|
@@ -7,18 +6,10 @@ export class SkipIterable {
|
|
|
7
6
|
this.offset = offset;
|
|
8
7
|
}
|
|
9
8
|
*[Symbol.iterator]() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
this.offset = this.collection.size() + this.offset;
|
|
13
|
-
}
|
|
14
|
-
yield* this.collection.skipWhile((_item, index) => index < this.offset);
|
|
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.offset < 0) {
|
|
10
|
+
this.offset = this.collection.size() + this.offset;
|
|
21
11
|
}
|
|
12
|
+
yield* this.collection.skipWhile((_item, index) => index < this.offset);
|
|
22
13
|
}
|
|
23
14
|
}
|
|
24
15
|
//# sourceMappingURL=skip-iterable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skip-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/skip-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"skip-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/skip-iterable.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,YAAY;IAET;IACA;IAFZ,YACY,UAA+B,EAC/B,MAAc;QADd,eAAU,GAAV,UAAU,CAAqB;QAC/B,WAAM,GAAN,MAAM,CAAQ;IACvB,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAClB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;QACvD,CAAC;QACD,KAAK,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5E,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class SkipUntilIterable {
|
|
3
2
|
collection;
|
|
4
3
|
predicateFn;
|
|
@@ -7,22 +6,14 @@ export class SkipUntilIterable {
|
|
|
7
6
|
this.predicateFn = predicateFn;
|
|
8
7
|
}
|
|
9
8
|
*[Symbol.iterator]() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
hasMatched = this.predicateFn(item, index, this.collection);
|
|
15
|
-
}
|
|
16
|
-
if (hasMatched) {
|
|
17
|
-
yield item;
|
|
18
|
-
}
|
|
9
|
+
let hasMatched = false;
|
|
10
|
+
for (const [index, item] of this.collection.entries()) {
|
|
11
|
+
if (!hasMatched) {
|
|
12
|
+
hasMatched = this.predicateFn(item, index, this.collection);
|
|
19
13
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (error instanceof CollectionError) {
|
|
23
|
-
throw error;
|
|
14
|
+
if (hasMatched) {
|
|
15
|
+
yield item;
|
|
24
16
|
}
|
|
25
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
26
17
|
}
|
|
27
18
|
}
|
|
28
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skip-until-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/skip-until-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"skip-until-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/skip-until-iterable.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,iBAAiB;IAEd;IACA;IAFZ,YACY,UAA+B,EAC/B,WAAmD;QADnD,eAAU,GAAV,UAAU,CAAqB;QAC/B,gBAAW,GAAX,WAAW,CAAwC;IAC5D,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,IAAI,UAAU,GAAG,KAAK,CAAC;QACvB,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,IAAI,CAAC,UAAU,EAAE,CAAC;gBACd,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;YAChE,CAAC;YACD,IAAI,UAAU,EAAE,CAAC;gBACb,MAAM,IAAI,CAAC;YACf,CAAC;QACL,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class SliceIterable {
|
|
3
2
|
collection;
|
|
4
3
|
start;
|
|
@@ -9,31 +8,23 @@ export class SliceIterable {
|
|
|
9
8
|
this.end = end;
|
|
10
9
|
}
|
|
11
10
|
*[Symbol.iterator]() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
start = 0;
|
|
17
|
-
}
|
|
18
|
-
if (end === undefined) {
|
|
19
|
-
end = size;
|
|
20
|
-
}
|
|
21
|
-
if (start < 0) {
|
|
22
|
-
start = size + start;
|
|
23
|
-
}
|
|
24
|
-
if (end < 0) {
|
|
25
|
-
end = size + end;
|
|
26
|
-
}
|
|
27
|
-
yield* this.collection.filter((_item, index) => {
|
|
28
|
-
return start <= index && index < end;
|
|
29
|
-
});
|
|
11
|
+
const size = this.collection.size();
|
|
12
|
+
let { start, end } = this;
|
|
13
|
+
if (start === undefined) {
|
|
14
|
+
start = 0;
|
|
30
15
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
throw error;
|
|
34
|
-
}
|
|
35
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
16
|
+
if (end === undefined) {
|
|
17
|
+
end = size;
|
|
36
18
|
}
|
|
19
|
+
if (start < 0) {
|
|
20
|
+
start = size + start;
|
|
21
|
+
}
|
|
22
|
+
if (end < 0) {
|
|
23
|
+
end = size + end;
|
|
24
|
+
}
|
|
25
|
+
yield* this.collection.filter((_item, index) => {
|
|
26
|
+
return start <= index && index < end;
|
|
27
|
+
});
|
|
37
28
|
}
|
|
38
29
|
}
|
|
39
30
|
//# sourceMappingURL=slice-iterable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slice-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/slice-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slice-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/slice-iterable.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,aAAa;IAEV;IACA;IACA;IAHZ,YACY,UAA+B,EAC/B,KAAyB,EACzB,GAAuB;QAFvB,eAAU,GAAV,UAAU,CAAqB;QAC/B,UAAK,GAAL,KAAK,CAAoB;QACzB,QAAG,GAAH,GAAG,CAAoB;IAChC,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QACpC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QAC1B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACtB,KAAK,GAAG,CAAC,CAAC;QACd,CAAC;QACD,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;YACpB,GAAG,GAAG,IAAI,CAAC;QACf,CAAC;QACD,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACZ,KAAK,GAAG,IAAI,GAAG,KAAK,CAAC;QACzB,CAAC;QACD,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;YACV,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC;QACrB,CAAC;QACD,KAAK,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC3C,OAAO,KAAK,IAAI,KAAK,IAAI,KAAK,GAAG,GAAG,CAAC;QACzC,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class SlidingIteralbe {
|
|
3
2
|
collection;
|
|
4
3
|
chunkSize;
|
|
@@ -9,25 +8,17 @@ export class SlidingIteralbe {
|
|
|
9
8
|
this.step = step;
|
|
10
9
|
}
|
|
11
10
|
*[Symbol.iterator]() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const size = 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 = 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":"sliding-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/sliding-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sliding-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/sliding-iterable.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,eAAe;IAEZ;IACA;IACA;IAHZ,YACY,UAA+B,EAC/B,SAAiB,EACjB,IAAY;QAFZ,eAAU,GAAV,UAAU,CAAqB;QAC/B,cAAS,GAAT,SAAS,CAAQ;QACjB,SAAI,GAAJ,IAAI,CAAQ;IACrB,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC;YACjB,OAAO;QACX,CAAC;QACD,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QAEpC,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"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class SortIterable {
|
|
3
2
|
iterable;
|
|
4
3
|
comparator;
|
|
@@ -7,15 +6,7 @@ export class SortIterable {
|
|
|
7
6
|
this.comparator = comparator;
|
|
8
7
|
}
|
|
9
8
|
*[Symbol.iterator]() {
|
|
10
|
-
|
|
11
|
-
yield* [...this.iterable].sort(this.comparator);
|
|
12
|
-
}
|
|
13
|
-
catch (error) {
|
|
14
|
-
if (error instanceof CollectionError) {
|
|
15
|
-
throw error;
|
|
16
|
-
}
|
|
17
|
-
throw new UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
18
|
-
}
|
|
9
|
+
yield* [...this.iterable].sort(this.comparator);
|
|
19
10
|
}
|
|
20
11
|
}
|
|
21
12
|
//# sourceMappingURL=sort-iterable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/sort-iterable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sort-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/sort-iterable.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,YAAY;IAET;IACA;IAFZ,YACY,QAA0B,EAC1B,UAA+B;QAD/B,aAAQ,GAAR,QAAQ,CAAkB;QAC1B,eAAU,GAAV,UAAU,CAAqB;IACxC,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpD,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CollectionError, UnexpectedCollectionError, } from "../../../contracts/collection/_module";
|
|
2
1
|
export class SplitIterable {
|
|
3
2
|
collection;
|
|
4
3
|
chunkAmount;
|
|
@@ -9,34 +8,26 @@ export class SplitIterable {
|
|
|
9
8
|
this.makeCollection = makeCollection;
|
|
10
9
|
}
|
|
11
10
|
*[Symbol.iterator]() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
chunkSizes[chunkIndex] = chunkSizes[chunkIndex] + 1;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
const iterator = this.collection.toIterator();
|
|
23
|
-
const array = [];
|
|
24
|
-
for (const chunkSize of chunkSizes) {
|
|
25
|
-
for (let i = 0; i < chunkSize; i++) {
|
|
26
|
-
const item = iterator.next();
|
|
27
|
-
if (item.value !== undefined) {
|
|
28
|
-
array.push(item.value);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
yield this.makeCollection(array);
|
|
32
|
-
array.length = 0;
|
|
11
|
+
const size = this.collection.size(), minChunkSize = Math.floor(size / this.chunkAmount), restSize = size % this.chunkAmount, chunkSizes = Array.from({
|
|
12
|
+
length: this.chunkAmount,
|
|
13
|
+
}).fill(minChunkSize);
|
|
14
|
+
for (let i = 1; i <= restSize; i++) {
|
|
15
|
+
const chunkIndex = (i - 1) % this.chunkAmount;
|
|
16
|
+
if (chunkSizes[chunkIndex]) {
|
|
17
|
+
chunkSizes[chunkIndex] = chunkSizes[chunkIndex] + 1;
|
|
33
18
|
}
|
|
34
19
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
20
|
+
const iterator = this.collection.toIterator();
|
|
21
|
+
const array = [];
|
|
22
|
+
for (const chunkSize of chunkSizes) {
|
|
23
|
+
for (let i = 0; i < chunkSize; i++) {
|
|
24
|
+
const item = iterator.next();
|
|
25
|
+
if (item.value !== undefined) {
|
|
26
|
+
array.push(item.value);
|
|
27
|
+
}
|
|
38
28
|
}
|
|
39
|
-
|
|
29
|
+
yield this.makeCollection(array);
|
|
30
|
+
array.length = 0;
|
|
40
31
|
}
|
|
41
32
|
}
|
|
42
33
|
}
|