@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.InsertBeforeIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class InsertBeforeIterable {
|
|
6
5
|
collection;
|
|
7
6
|
predicateFn;
|
|
@@ -12,22 +11,13 @@ class InsertBeforeIterable {
|
|
|
12
11
|
this.iterable = iterable;
|
|
13
12
|
}
|
|
14
13
|
*[Symbol.iterator]() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
yield* this.iterable;
|
|
21
|
-
hasMatched = true;
|
|
22
|
-
}
|
|
23
|
-
yield item;
|
|
14
|
+
let hasMatched = false;
|
|
15
|
+
for (const [index, item] of this.collection.entries()) {
|
|
16
|
+
if (!hasMatched && this.predicateFn(item, index, this.collection)) {
|
|
17
|
+
yield* this.iterable;
|
|
18
|
+
hasMatched = true;
|
|
24
19
|
}
|
|
25
|
-
|
|
26
|
-
catch (error) {
|
|
27
|
-
if (error instanceof _module_1.CollectionError) {
|
|
28
|
-
throw error;
|
|
29
|
-
}
|
|
30
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
20
|
+
yield item;
|
|
31
21
|
}
|
|
32
22
|
}
|
|
33
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insert-before-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/insert-before-iterable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"insert-before-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/iterable-collection/_shared/insert-before-iterable.ts"],"names":[],"mappings":";;;AAQA,MAAa,oBAAoB;IAIjB;IACA;IACA;IAHZ,YACY,UAA+B,EAC/B,WAAmD,EACnD,QAAsC;QAFtC,eAAU,GAAV,UAAU,CAAqB;QAC/B,gBAAW,GAAX,WAAW,CAAwC;QACnD,aAAQ,GAAR,QAAQ,CAA8B;IAC/C,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,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;gBAChE,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;gBACrB,UAAU,GAAG,IAAI,CAAC;YACtB,CAAC;YACD,MAAM,IAAI,CAAC;QACf,CAAC;IACL,CAAC;CACJ;AAnBD,oDAmBC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MapIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class MapIterable {
|
|
6
5
|
collection;
|
|
7
6
|
mapFn;
|
|
@@ -10,16 +9,8 @@ class MapIterable {
|
|
|
10
9
|
this.mapFn = mapFn;
|
|
11
10
|
}
|
|
12
11
|
*[Symbol.iterator]() {
|
|
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 (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":"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,MAAa,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;AAXD,kCAWC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MergeIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class MergeIterable {
|
|
6
5
|
iterableA;
|
|
7
6
|
iterableB;
|
|
@@ -10,16 +9,8 @@ class MergeIterable {
|
|
|
10
9
|
this.iterableB = iterableB;
|
|
11
10
|
}
|
|
12
11
|
*[Symbol.iterator]() {
|
|
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.MergeIterable = MergeIterable;
|
|
@@ -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,MAAa,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;AAZD,sCAYC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PadEndIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class PadEndIterable {
|
|
6
5
|
collection;
|
|
7
6
|
maxLength;
|
|
@@ -14,26 +13,18 @@ class PadEndIterable {
|
|
|
14
13
|
this.makeCollection = makeCollection;
|
|
15
14
|
}
|
|
16
15
|
*[Symbol.iterator]() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
resultCollection = resultCollection.append(fillCollections);
|
|
25
|
-
}
|
|
26
|
-
const restAmount = this.maxLength - (repeat * fillSize + size);
|
|
27
|
-
resultCollection = resultCollection.append(fillCollections.slice(0, restAmount));
|
|
28
|
-
resultCollection = resultCollection.prepend(this.collection);
|
|
29
|
-
yield* resultCollection;
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
if (error instanceof _module_1.CollectionError) {
|
|
33
|
-
throw error;
|
|
34
|
-
}
|
|
35
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
16
|
+
const fillCollections = this.makeCollection(this.fillItems);
|
|
17
|
+
const fillSize = fillCollections.size();
|
|
18
|
+
const size = this.collection.size();
|
|
19
|
+
const repeat = Math.floor((this.maxLength - size) / fillSize);
|
|
20
|
+
let resultCollection = this.makeCollection([]);
|
|
21
|
+
for (let index = 0; index < repeat; index++) {
|
|
22
|
+
resultCollection = resultCollection.append(fillCollections);
|
|
36
23
|
}
|
|
24
|
+
const restAmount = this.maxLength - (repeat * fillSize + size);
|
|
25
|
+
resultCollection = resultCollection.append(fillCollections.slice(0, restAmount));
|
|
26
|
+
resultCollection = resultCollection.prepend(this.collection);
|
|
27
|
+
yield* resultCollection;
|
|
37
28
|
}
|
|
38
29
|
}
|
|
39
30
|
exports.PadEndIterable = PadEndIterable;
|
|
@@ -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,MAAa,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;AA7BD,wCA6BC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PadStartIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class PadStartIterable {
|
|
6
5
|
collection;
|
|
7
6
|
maxLength;
|
|
@@ -14,26 +13,18 @@ class PadStartIterable {
|
|
|
14
13
|
this.makeCollection = makeCollection;
|
|
15
14
|
}
|
|
16
15
|
*[Symbol.iterator]() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
resultCollection = resultCollection.append(fillCollections);
|
|
25
|
-
}
|
|
26
|
-
const restAmount = this.maxLength - (repeat * fillSize + size);
|
|
27
|
-
resultCollection = resultCollection.append(fillCollections.slice(0, restAmount));
|
|
28
|
-
resultCollection = resultCollection.append(this.collection);
|
|
29
|
-
yield* resultCollection;
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
if (error instanceof _module_1.CollectionError) {
|
|
33
|
-
throw error;
|
|
34
|
-
}
|
|
35
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
16
|
+
const fillCollections = this.makeCollection(this.fillItems);
|
|
17
|
+
const fillSize = fillCollections.size();
|
|
18
|
+
const size = this.collection.size();
|
|
19
|
+
const repeat = Math.floor((this.maxLength - size) / fillSize);
|
|
20
|
+
let resultCollection = this.makeCollection([]);
|
|
21
|
+
for (let index = 0; index < repeat; index++) {
|
|
22
|
+
resultCollection = resultCollection.append(fillCollections);
|
|
36
23
|
}
|
|
24
|
+
const restAmount = this.maxLength - (repeat * fillSize + size);
|
|
25
|
+
resultCollection = resultCollection.append(fillCollections.slice(0, restAmount));
|
|
26
|
+
resultCollection = resultCollection.append(this.collection);
|
|
27
|
+
yield* resultCollection;
|
|
37
28
|
}
|
|
38
29
|
}
|
|
39
30
|
exports.PadStartIterable = PadStartIterable;
|
|
@@ -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,MAAa,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;AA7BD,4CA6BC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PartionIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class PartionIterable {
|
|
6
5
|
collection;
|
|
7
6
|
predicateFn;
|
|
@@ -12,26 +11,18 @@ class PartionIterable {
|
|
|
12
11
|
this.makeCollection = makeCollection;
|
|
13
12
|
}
|
|
14
13
|
*[Symbol.iterator]() {
|
|
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 (const [index, item] of this.collection.entries()) {
|
|
17
|
+
if (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.PartionIterable = PartionIterable;
|
|
@@ -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,MAAa,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;AAvBD,0CAuBC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RepeatIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class RepeatIterable {
|
|
6
5
|
collection;
|
|
7
6
|
amount;
|
|
@@ -12,19 +11,11 @@ class RepeatIterable {
|
|
|
12
11
|
this.makeCollection = makeCollection;
|
|
13
12
|
}
|
|
14
13
|
*[Symbol.iterator]() {
|
|
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.makeCollection([]);
|
|
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.RepeatIterable = RepeatIterable;
|
|
@@ -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,MAAa,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;AAhBD,wCAgBC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ReverseIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class ReverseIterable {
|
|
6
5
|
collection;
|
|
7
6
|
chunkSize;
|
|
@@ -12,18 +11,10 @@ class ReverseIterable {
|
|
|
12
11
|
this.makeCollection = makeCollection;
|
|
13
12
|
}
|
|
14
13
|
*[Symbol.iterator]() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.reduce((collection, item) => collection.prepend(item), this.makeCollection([]));
|
|
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);
|
|
26
|
-
}
|
|
14
|
+
yield* this.collection
|
|
15
|
+
.chunk(this.chunkSize)
|
|
16
|
+
.map((item) => this.makeCollection([...item].reverse()))
|
|
17
|
+
.reduce((collection, item) => collection.prepend(item), this.makeCollection([]));
|
|
27
18
|
}
|
|
28
19
|
}
|
|
29
20
|
exports.ReverseIterable = ReverseIterable;
|
|
@@ -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,MAAa,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;AAnBD,0CAmBC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ShuffleIterable = void 0;
|
|
4
|
-
const _shared_1 = require("../../../contracts/collection/_shared");
|
|
5
4
|
class ShuffleIterable {
|
|
6
5
|
iterable;
|
|
7
6
|
mathRandom;
|
|
@@ -10,26 +9,18 @@ class ShuffleIterable {
|
|
|
10
9
|
this.mathRandom = mathRandom;
|
|
11
10
|
}
|
|
12
11
|
*[Symbol.iterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
newArray[i] = newArray[j];
|
|
20
|
-
}
|
|
21
|
-
if (temp !== undefined) {
|
|
22
|
-
newArray[j] = temp;
|
|
23
|
-
}
|
|
12
|
+
const newArray = [...this.iterable];
|
|
13
|
+
for (let i = newArray.length - 1; i > 0; i--) {
|
|
14
|
+
const j = Math.floor(this.mathRandom() * (i + 1));
|
|
15
|
+
const temp = newArray[i];
|
|
16
|
+
if (newArray[j] !== undefined) {
|
|
17
|
+
newArray[i] = newArray[j];
|
|
24
18
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
catch (error) {
|
|
28
|
-
if (error instanceof _shared_1.CollectionError) {
|
|
29
|
-
throw error;
|
|
19
|
+
if (temp !== undefined) {
|
|
20
|
+
newArray[j] = temp;
|
|
30
21
|
}
|
|
31
|
-
throw new _shared_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
32
22
|
}
|
|
23
|
+
yield* newArray;
|
|
33
24
|
}
|
|
34
25
|
}
|
|
35
26
|
exports.ShuffleIterable = ShuffleIterable;
|
|
@@ -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,MAAa,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;AApBD,0CAoBC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SkipIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class SkipIterable {
|
|
6
5
|
collection;
|
|
7
6
|
offset;
|
|
@@ -10,18 +9,10 @@ class SkipIterable {
|
|
|
10
9
|
this.offset = offset;
|
|
11
10
|
}
|
|
12
11
|
*[Symbol.iterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
this.offset = this.collection.size() + this.offset;
|
|
16
|
-
}
|
|
17
|
-
yield* this.collection.skipWhile((_item, index) => index < this.offset);
|
|
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.offset < 0) {
|
|
13
|
+
this.offset = this.collection.size() + this.offset;
|
|
24
14
|
}
|
|
15
|
+
yield* this.collection.skipWhile((_item, index) => index < this.offset);
|
|
25
16
|
}
|
|
26
17
|
}
|
|
27
18
|
exports.SkipIterable = SkipIterable;
|
|
@@ -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,MAAa,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;AAZD,oCAYC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SkipUntilIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class SkipUntilIterable {
|
|
6
5
|
collection;
|
|
7
6
|
predicateFn;
|
|
@@ -10,22 +9,14 @@ class SkipUntilIterable {
|
|
|
10
9
|
this.predicateFn = predicateFn;
|
|
11
10
|
}
|
|
12
11
|
*[Symbol.iterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
hasMatched = this.predicateFn(item, index, this.collection);
|
|
18
|
-
}
|
|
19
|
-
if (hasMatched) {
|
|
20
|
-
yield item;
|
|
21
|
-
}
|
|
12
|
+
let hasMatched = false;
|
|
13
|
+
for (const [index, item] of this.collection.entries()) {
|
|
14
|
+
if (!hasMatched) {
|
|
15
|
+
hasMatched = this.predicateFn(item, index, this.collection);
|
|
22
16
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (error instanceof _module_1.CollectionError) {
|
|
26
|
-
throw error;
|
|
17
|
+
if (hasMatched) {
|
|
18
|
+
yield item;
|
|
27
19
|
}
|
|
28
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
29
20
|
}
|
|
30
21
|
}
|
|
31
22
|
}
|
|
@@ -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,MAAa,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;AAjBD,8CAiBC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SliceIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class SliceIterable {
|
|
6
5
|
collection;
|
|
7
6
|
start;
|
|
@@ -12,31 +11,23 @@ class SliceIterable {
|
|
|
12
11
|
this.end = end;
|
|
13
12
|
}
|
|
14
13
|
*[Symbol.iterator]() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
start = 0;
|
|
20
|
-
}
|
|
21
|
-
if (end === undefined) {
|
|
22
|
-
end = size;
|
|
23
|
-
}
|
|
24
|
-
if (start < 0) {
|
|
25
|
-
start = size + start;
|
|
26
|
-
}
|
|
27
|
-
if (end < 0) {
|
|
28
|
-
end = size + end;
|
|
29
|
-
}
|
|
30
|
-
yield* this.collection.filter((_item, index) => {
|
|
31
|
-
return start <= index && index < end;
|
|
32
|
-
});
|
|
14
|
+
const size = this.collection.size();
|
|
15
|
+
let { start, end } = this;
|
|
16
|
+
if (start === undefined) {
|
|
17
|
+
start = 0;
|
|
33
18
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
throw error;
|
|
37
|
-
}
|
|
38
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
19
|
+
if (end === undefined) {
|
|
20
|
+
end = size;
|
|
39
21
|
}
|
|
22
|
+
if (start < 0) {
|
|
23
|
+
start = size + start;
|
|
24
|
+
}
|
|
25
|
+
if (end < 0) {
|
|
26
|
+
end = size + end;
|
|
27
|
+
}
|
|
28
|
+
yield* this.collection.filter((_item, index) => {
|
|
29
|
+
return start <= index && index < end;
|
|
30
|
+
});
|
|
40
31
|
}
|
|
41
32
|
}
|
|
42
33
|
exports.SliceIterable = SliceIterable;
|
|
@@ -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,MAAa,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;AA1BD,sCA0BC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SlidingIteralbe = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class SlidingIteralbe {
|
|
6
5
|
collection;
|
|
7
6
|
chunkSize;
|
|
@@ -12,25 +11,17 @@ class SlidingIteralbe {
|
|
|
12
11
|
this.step = step;
|
|
13
12
|
}
|
|
14
13
|
*[Symbol.iterator]() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const size = 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 = 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":"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,MAAa,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;AAxBD,0CAwBC"}
|