@daiso-tech/core 0.1.2 → 0.1.4
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/README.md +31 -0
- package/dist/cjs/{types.js.map → _shared/types.js.map} +1 -1
- package/dist/cjs/collection/_shared.js.map +1 -1
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/_module.js +35 -35
- package/dist/cjs/collection/async-iterable-collection/_shared/_module.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/async-abort-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/async-chunk-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-chunk-whilte-iterable.js +4 -4
- package/dist/cjs/collection/async-iterable-collection/_shared/async-chunk-whilte-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/async-collapse-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-count-by-iterable.js +4 -4
- package/dist/cjs/collection/async-iterable-collection/_shared/async-count-by-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/async-cross-join-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/async-delay-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-entries-iterable.js +5 -4
- package/dist/cjs/collection/async-iterable-collection/_shared/async-entries-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-filter-iterable.js +4 -4
- package/dist/cjs/collection/async-iterable-collection/_shared/async-filter-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-flat-map-iterable.js +7 -7
- package/dist/cjs/collection/async-iterable-collection/_shared/async-flat-map-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-group-by-iterable.js +4 -4
- package/dist/cjs/collection/async-iterable-collection/_shared/async-group-by-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-insert-after-iterable.js +4 -4
- package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-after-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-insert-before-iterable.js +4 -4
- package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-before-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-map-iterable.js +7 -7
- package/dist/cjs/collection/async-iterable-collection/_shared/async-map-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/async-merge-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/async-pad-end-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/async-pad-start-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-partion-iterable.js +4 -4
- package/dist/cjs/collection/async-iterable-collection/_shared/async-partion-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/async-repeat-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-reverse-iterable.js +5 -5
- package/dist/cjs/collection/async-iterable-collection/_shared/async-reverse-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/async-shuffle-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-skip-iterable.js +5 -5
- package/dist/cjs/collection/async-iterable-collection/_shared/async-skip-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-skip-until-iterable.js +4 -4
- package/dist/cjs/collection/async-iterable-collection/_shared/async-skip-until-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-slice-iterable.js +4 -4
- package/dist/cjs/collection/async-iterable-collection/_shared/async-slice-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-sliding-iterable.js +5 -5
- package/dist/cjs/collection/async-iterable-collection/_shared/async-sliding-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-sort-iterable.js +4 -4
- package/dist/cjs/collection/async-iterable-collection/_shared/async-sort-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-split-iterable.js +5 -5
- package/dist/cjs/collection/async-iterable-collection/_shared/async-split-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-take-iterable.js +5 -5
- package/dist/cjs/collection/async-iterable-collection/_shared/async-take-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-take-until-iterable.js +4 -4
- package/dist/cjs/collection/async-iterable-collection/_shared/async-take-until-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/async-tap-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/async-timeout-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-unique-iterable.js +3 -3
- package/dist/cjs/collection/async-iterable-collection/_shared/async-unique-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-update-iterable.js +7 -7
- package/dist/cjs/collection/async-iterable-collection/_shared/async-update-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/async-when-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_shared/async-zip-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-collection.js +121 -100
- package/dist/cjs/collection/async-iterable-collection/async-iterable-collection.js.map +1 -1
- package/dist/cjs/collection/iterable-collection/_shared/_module.js +49 -0
- package/dist/cjs/collection/iterable-collection/_shared/_module.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/_shared/chunk-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/chunk-whilte-iterable.js +7 -7
- package/dist/cjs/collection/iterable-collection/_shared/chunk-whilte-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/_shared/collapse-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/count-by-iterable.js +7 -7
- package/dist/cjs/collection/iterable-collection/_shared/count-by-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/_shared/cross-join-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/entries-iterable.js +4 -4
- package/dist/cjs/collection/iterable-collection/_shared/entries-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/filter-iterable.js +7 -7
- package/dist/cjs/collection/iterable-collection/_shared/filter-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/flat-map-iterable.js +7 -7
- package/dist/cjs/collection/iterable-collection/_shared/flat-map-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/group-by-iterable.js +7 -7
- package/dist/cjs/collection/iterable-collection/_shared/group-by-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/insert-after-iterable.js +8 -7
- package/dist/cjs/collection/iterable-collection/_shared/insert-after-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/insert-before-iterable.js +8 -7
- package/dist/cjs/collection/iterable-collection/_shared/insert-before-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/map-iterable.js +7 -7
- package/dist/cjs/collection/iterable-collection/_shared/map-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/_shared/merge-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/_shared/pad-end-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/_shared/pad-start-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/partion-iterable.js +7 -7
- package/dist/cjs/collection/iterable-collection/_shared/partion-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/_shared/repeat-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/reverse-iterable.js +5 -5
- package/dist/cjs/collection/iterable-collection/_shared/reverse-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/_shared/shuffle-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/skip-iterable.js +6 -5
- package/dist/cjs/collection/iterable-collection/_shared/skip-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/skip-until-iterable.js +7 -7
- package/dist/cjs/collection/iterable-collection/_shared/skip-until-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/slice-iterable.js +4 -4
- package/dist/cjs/collection/iterable-collection/_shared/slice-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/sliding-iterable.js +5 -5
- package/dist/cjs/collection/iterable-collection/_shared/sliding-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/sort-iterable.js +4 -4
- package/dist/cjs/collection/iterable-collection/_shared/sort-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/split-iterable.js +5 -5
- package/dist/cjs/collection/iterable-collection/_shared/split-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/take-iterable.js +6 -5
- package/dist/cjs/collection/iterable-collection/_shared/take-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/take-until-iterable.js +7 -7
- package/dist/cjs/collection/iterable-collection/_shared/take-until-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/_shared/tap-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/unique-iterable.js +4 -4
- package/dist/cjs/collection/iterable-collection/_shared/unique-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/update-iterable.js +10 -10
- package/dist/cjs/collection/iterable-collection/_shared/update-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/_shared/when-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/_shared/zip-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-collection.js +137 -111
- package/dist/cjs/collection/iterable-collection/iterable-collection.js.map +1 -1
- package/dist/cjs/collection/list-collection/list-collection.js +105 -73
- package/dist/cjs/collection/list-collection/list-collection.js.map +1 -1
- package/dist/cjs/contracts/_module.js +1 -1
- package/dist/cjs/contracts/_module.js.map +1 -1
- package/dist/cjs/contracts/collection/_module.js.map +1 -1
- package/dist/cjs/contracts/collection/_shared.js +1 -1
- package/dist/cjs/contracts/collection/_shared.js.map +1 -1
- package/dist/esm/{types.js.map → _shared/types.js.map} +1 -1
- package/dist/esm/collection/_shared.js.map +1 -1
- package/dist/esm/collection/async-iterable-collection/_shared/_module.js +36 -0
- package/dist/esm/collection/async-iterable-collection/_shared/_module.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_shared/async-abort-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_shared/async-chunk-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-chunk-whilte-iterable.js +4 -4
- package/dist/esm/collection/async-iterable-collection/_shared/async-chunk-whilte-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_shared/async-collapse-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-count-by-iterable.js +4 -4
- package/dist/esm/collection/async-iterable-collection/_shared/async-count-by-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_shared/async-cross-join-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_shared/async-delay-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-entries-iterable.js +5 -4
- package/dist/esm/collection/async-iterable-collection/_shared/async-entries-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-filter-iterable.js +4 -4
- package/dist/esm/collection/async-iterable-collection/_shared/async-filter-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-flat-map-iterable.js +7 -7
- package/dist/esm/collection/async-iterable-collection/_shared/async-flat-map-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-group-by-iterable.js +4 -4
- package/dist/esm/collection/async-iterable-collection/_shared/async-group-by-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-insert-after-iterable.js +4 -4
- package/dist/esm/collection/async-iterable-collection/_shared/async-insert-after-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-insert-before-iterable.js +4 -4
- package/dist/esm/collection/async-iterable-collection/_shared/async-insert-before-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-map-iterable.js +7 -7
- package/dist/esm/collection/async-iterable-collection/_shared/async-map-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_shared/async-merge-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_shared/async-pad-end-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_shared/async-pad-start-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-partion-iterable.js +4 -4
- package/dist/esm/collection/async-iterable-collection/_shared/async-partion-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_shared/async-repeat-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-reverse-iterable.js +5 -5
- package/dist/esm/collection/async-iterable-collection/_shared/async-reverse-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_shared/async-shuffle-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-skip-iterable.js +5 -5
- package/dist/esm/collection/async-iterable-collection/_shared/async-skip-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-skip-until-iterable.js +4 -4
- package/dist/esm/collection/async-iterable-collection/_shared/async-skip-until-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-slice-iterable.js +4 -4
- package/dist/esm/collection/async-iterable-collection/_shared/async-slice-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-sliding-iterable.js +5 -5
- package/dist/esm/collection/async-iterable-collection/_shared/async-sliding-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-sort-iterable.js +4 -4
- package/dist/esm/collection/async-iterable-collection/_shared/async-sort-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-split-iterable.js +5 -5
- package/dist/esm/collection/async-iterable-collection/_shared/async-split-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-take-iterable.js +5 -5
- package/dist/esm/collection/async-iterable-collection/_shared/async-take-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-take-until-iterable.js +4 -4
- package/dist/esm/collection/async-iterable-collection/_shared/async-take-until-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_shared/async-tap-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_shared/async-timeout-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-unique-iterable.js +3 -3
- package/dist/esm/collection/async-iterable-collection/_shared/async-unique-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-update-iterable.js +7 -7
- package/dist/esm/collection/async-iterable-collection/_shared/async-update-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_shared/async-when-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_shared/async-zip-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-collection.js +121 -100
- package/dist/esm/collection/async-iterable-collection/async-iterable-collection.js.map +1 -1
- package/dist/esm/collection/iterable-collection/_shared/_module.js +33 -0
- package/dist/esm/collection/iterable-collection/_shared/_module.js.map +1 -0
- package/dist/esm/collection/iterable-collection/_shared/chunk-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/chunk-whilte-iterable.js +7 -7
- package/dist/esm/collection/iterable-collection/_shared/chunk-whilte-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/_shared/collapse-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/count-by-iterable.js +7 -7
- package/dist/esm/collection/iterable-collection/_shared/count-by-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/_shared/cross-join-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/entries-iterable.js +4 -4
- package/dist/esm/collection/iterable-collection/_shared/entries-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/filter-iterable.js +7 -7
- package/dist/esm/collection/iterable-collection/_shared/filter-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/flat-map-iterable.js +7 -7
- package/dist/esm/collection/iterable-collection/_shared/flat-map-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/group-by-iterable.js +7 -7
- package/dist/esm/collection/iterable-collection/_shared/group-by-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/insert-after-iterable.js +8 -7
- package/dist/esm/collection/iterable-collection/_shared/insert-after-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/insert-before-iterable.js +8 -7
- package/dist/esm/collection/iterable-collection/_shared/insert-before-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/map-iterable.js +7 -7
- package/dist/esm/collection/iterable-collection/_shared/map-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/_shared/merge-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/_shared/pad-end-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/_shared/pad-start-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/partion-iterable.js +7 -7
- package/dist/esm/collection/iterable-collection/_shared/partion-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/_shared/repeat-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/reverse-iterable.js +5 -5
- package/dist/esm/collection/iterable-collection/_shared/reverse-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/_shared/shuffle-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/skip-iterable.js +6 -5
- package/dist/esm/collection/iterable-collection/_shared/skip-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/skip-until-iterable.js +7 -7
- package/dist/esm/collection/iterable-collection/_shared/skip-until-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/slice-iterable.js +4 -4
- package/dist/esm/collection/iterable-collection/_shared/slice-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/sliding-iterable.js +5 -5
- package/dist/esm/collection/iterable-collection/_shared/sliding-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/sort-iterable.js +4 -4
- package/dist/esm/collection/iterable-collection/_shared/sort-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/split-iterable.js +5 -5
- package/dist/esm/collection/iterable-collection/_shared/split-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/take-iterable.js +6 -5
- package/dist/esm/collection/iterable-collection/_shared/take-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/take-until-iterable.js +7 -7
- package/dist/esm/collection/iterable-collection/_shared/take-until-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/_shared/tap-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/unique-iterable.js +4 -4
- package/dist/esm/collection/iterable-collection/_shared/unique-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/update-iterable.js +10 -10
- package/dist/esm/collection/iterable-collection/_shared/update-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/_shared/when-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/_shared/zip-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-collection.js +137 -111
- package/dist/esm/collection/iterable-collection/iterable-collection.js.map +1 -1
- package/dist/esm/collection/list-collection/list-collection.js +105 -73
- package/dist/esm/collection/list-collection/list-collection.js.map +1 -1
- package/dist/esm/contracts/_module.js +1 -1
- package/dist/esm/contracts/_module.js.map +1 -1
- package/dist/esm/contracts/collection/_module.js.map +1 -1
- package/dist/esm/contracts/collection/_shared.js +1 -1
- package/dist/esm/contracts/collection/_shared.js.map +1 -1
- package/dist/types/collection/_shared.d.ts +9 -3
- package/dist/types/collection/async-iterable-collection/_shared/_module.d.ts +35 -0
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-chunk-whilte-iterable.d.ts +3 -3
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-count-by-iterable.d.ts +2 -2
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-entries-iterable.d.ts +2 -2
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-filter-iterable.d.ts +3 -3
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-flat-map-iterable.d.ts +3 -3
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-group-by-iterable.d.ts +2 -2
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-insert-after-iterable.d.ts +3 -3
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-insert-before-iterable.d.ts +3 -3
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-map-iterable.d.ts +3 -3
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-partion-iterable.d.ts +3 -3
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-reverse-iterable.d.ts +2 -2
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-skip-iterable.d.ts +2 -2
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-skip-until-iterable.d.ts +3 -3
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-slice-iterable.d.ts +2 -2
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-sliding-iterable.d.ts +2 -2
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-sort-iterable.d.ts +2 -2
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-split-iterable.d.ts +2 -2
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-take-iterable.d.ts +2 -2
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-take-until-iterable.d.ts +3 -3
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-unique-iterable.d.ts +2 -2
- package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-update-iterable.d.ts +4 -4
- package/dist/types/collection/async-iterable-collection/async-iterable-collection.d.ts +53 -44
- package/dist/types/collection/iterable-collection/_shared/_module.d.ts +32 -0
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/chunk-iterable.d.ts +3 -0
- package/dist/types/collection/iterable-collection/_shared/chunk-whilte-iterable.d.ts +12 -0
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/collapse-iterable.d.ts +3 -0
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/count-by-iterable.d.ts +6 -3
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/cross-join-iterable.d.ts +3 -0
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/entries-iterable.d.ts +5 -2
- package/dist/types/collection/iterable-collection/_shared/filter-iterable.d.ts +11 -0
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/flat-map-iterable.d.ts +6 -3
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/group-by-iterable.d.ts +6 -3
- package/dist/types/collection/iterable-collection/_shared/insert-after-iterable.d.ts +12 -0
- package/dist/types/collection/iterable-collection/_shared/insert-before-iterable.d.ts +12 -0
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/map-iterable.d.ts +6 -3
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/merge-iterable.d.ts +3 -0
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/pad-end-iterable.d.ts +3 -0
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/pad-start-iterable.d.ts +3 -0
- package/dist/types/collection/iterable-collection/_shared/partion-iterable.d.ts +12 -0
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/repeat-iterable.d.ts +3 -0
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/reverse-iterable.d.ts +5 -2
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/shuffle-iterable.d.ts +3 -0
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/skip-iterable.d.ts +5 -2
- package/dist/types/collection/iterable-collection/_shared/skip-until-iterable.d.ts +11 -0
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/slice-iterable.d.ts +5 -2
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/sliding-iterable.d.ts +5 -2
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/sort-iterable.d.ts +5 -2
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/split-iterable.d.ts +5 -2
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/take-iterable.d.ts +5 -2
- package/dist/types/collection/iterable-collection/_shared/take-until-iterable.d.ts +11 -0
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/tap-iterable.d.ts +3 -0
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/unique-iterable.d.ts +5 -2
- package/dist/types/collection/iterable-collection/_shared/update-iterable.d.ts +12 -0
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/when-iterable.d.ts +3 -0
- package/dist/types/collection/iterable-collection/{iterable-helpers → _shared}/zip-iterable.d.ts +3 -0
- package/dist/types/collection/iterable-collection/iterable-collection.d.ts +53 -44
- package/dist/types/collection/list-collection/list-collection.d.ts +52 -44
- package/dist/types/contracts/_module.d.ts +1 -1
- package/dist/types/contracts/collection/_module.d.ts +3 -0
- package/dist/types/contracts/collection/_shared.d.ts +123 -170
- package/dist/types/contracts/collection/async-collection.contract.d.ts +606 -211
- package/dist/types/contracts/collection/collection.contract.d.ts +546 -155
- package/package.json +17 -5
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/_module.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-abort-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-chunk-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-chunk-whilte-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-collapse-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-count-by-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-cross-join-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-delay-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-entries-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-filter-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-flat-map-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-group-by-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-insert-after-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-insert-before-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-map-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-merge-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-pad-end-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-pad-start-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-partion-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-repeat-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-reverse-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-shuffle-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-skip-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-skip-until-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-slice-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-sliding-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-sort-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-split-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-take-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-take-until-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-tap-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-timeout-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-unique-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-update-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-when-iterable.js.map +0 -1
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-zip-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/_module.js +0 -49
- package/dist/cjs/collection/iterable-collection/iterable-helpers/_module.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/chunk-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/chunk-whilte-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/collapse-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/count-by-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/cross-join-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/entries-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/filter-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/flat-map-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/group-by-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/insert-after-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/insert-before-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/map-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/merge-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/pad-end-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/pad-start-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/partion-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/repeat-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/reverse-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/shuffle-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/skip-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/skip-until-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/slice-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/sliding-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/sort-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/split-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/take-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/take-until-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/tap-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/unique-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/update-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/when-iterable.js.map +0 -1
- package/dist/cjs/collection/iterable-collection/iterable-helpers/zip-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/_module.js +0 -36
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/_module.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-abort-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-chunk-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-chunk-whilte-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-collapse-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-count-by-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-cross-join-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-delay-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-entries-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-filter-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-flat-map-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-group-by-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-insert-after-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-insert-before-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-map-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-merge-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-pad-end-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-pad-start-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-partion-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-repeat-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-reverse-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-shuffle-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-skip-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-skip-until-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-slice-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-sliding-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-sort-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-split-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-take-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-take-until-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-tap-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-timeout-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-unique-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-update-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-when-iterable.js.map +0 -1
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-zip-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/_module.js +0 -33
- package/dist/esm/collection/iterable-collection/iterable-helpers/_module.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/chunk-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/chunk-whilte-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/collapse-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/count-by-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/cross-join-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/entries-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/filter-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/flat-map-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/group-by-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/insert-after-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/insert-before-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/map-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/merge-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/pad-end-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/pad-start-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/partion-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/repeat-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/reverse-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/shuffle-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/skip-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/skip-until-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/slice-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/sliding-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/sort-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/split-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/take-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/take-until-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/tap-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/unique-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/update-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/when-iterable.js.map +0 -1
- package/dist/esm/collection/iterable-collection/iterable-helpers/zip-iterable.js.map +0 -1
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/_module.d.ts +0 -35
- package/dist/types/collection/iterable-collection/iterable-helpers/_module.d.ts +0 -32
- package/dist/types/collection/iterable-collection/iterable-helpers/chunk-whilte-iterable.d.ts +0 -9
- package/dist/types/collection/iterable-collection/iterable-helpers/filter-iterable.d.ts +0 -8
- package/dist/types/collection/iterable-collection/iterable-helpers/insert-after-iterable.d.ts +0 -9
- package/dist/types/collection/iterable-collection/iterable-helpers/insert-before-iterable.d.ts +0 -9
- package/dist/types/collection/iterable-collection/iterable-helpers/partion-iterable.d.ts +0 -9
- package/dist/types/collection/iterable-collection/iterable-helpers/skip-until-iterable.d.ts +0 -8
- package/dist/types/collection/iterable-collection/iterable-helpers/take-until-iterable.d.ts +0 -8
- package/dist/types/collection/iterable-collection/iterable-helpers/update-iterable.d.ts +0 -9
- /package/dist/cjs/{types.js → _shared/types.js} +0 -0
- /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-abort-iterable.js +0 -0
- /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-chunk-iterable.js +0 -0
- /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-collapse-iterable.js +0 -0
- /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-cross-join-iterable.js +0 -0
- /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-delay-iterable.js +0 -0
- /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-merge-iterable.js +0 -0
- /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-pad-end-iterable.js +0 -0
- /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-pad-start-iterable.js +0 -0
- /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-repeat-iterable.js +0 -0
- /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-shuffle-iterable.js +0 -0
- /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-tap-iterable.js +0 -0
- /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-timeout-iterable.js +0 -0
- /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-when-iterable.js +0 -0
- /package/dist/cjs/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-zip-iterable.js +0 -0
- /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/chunk-iterable.js +0 -0
- /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/collapse-iterable.js +0 -0
- /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/cross-join-iterable.js +0 -0
- /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/merge-iterable.js +0 -0
- /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/pad-end-iterable.js +0 -0
- /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/pad-start-iterable.js +0 -0
- /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/repeat-iterable.js +0 -0
- /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/shuffle-iterable.js +0 -0
- /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/tap-iterable.js +0 -0
- /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/when-iterable.js +0 -0
- /package/dist/cjs/collection/iterable-collection/{iterable-helpers → _shared}/zip-iterable.js +0 -0
- /package/dist/esm/{types.js → _shared/types.js} +0 -0
- /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-abort-iterable.js +0 -0
- /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-chunk-iterable.js +0 -0
- /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-collapse-iterable.js +0 -0
- /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-cross-join-iterable.js +0 -0
- /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-delay-iterable.js +0 -0
- /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-merge-iterable.js +0 -0
- /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-pad-end-iterable.js +0 -0
- /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-pad-start-iterable.js +0 -0
- /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-repeat-iterable.js +0 -0
- /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-shuffle-iterable.js +0 -0
- /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-tap-iterable.js +0 -0
- /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-timeout-iterable.js +0 -0
- /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-when-iterable.js +0 -0
- /package/dist/esm/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-zip-iterable.js +0 -0
- /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/chunk-iterable.js +0 -0
- /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/collapse-iterable.js +0 -0
- /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/cross-join-iterable.js +0 -0
- /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/merge-iterable.js +0 -0
- /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/pad-end-iterable.js +0 -0
- /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/pad-start-iterable.js +0 -0
- /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/repeat-iterable.js +0 -0
- /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/shuffle-iterable.js +0 -0
- /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/tap-iterable.js +0 -0
- /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/when-iterable.js +0 -0
- /package/dist/esm/collection/iterable-collection/{iterable-helpers → _shared}/zip-iterable.js +0 -0
- /package/dist/types/{types.d.ts → _shared/types.d.ts} +0 -0
- /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-abort-iterable.d.ts +0 -0
- /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-chunk-iterable.d.ts +0 -0
- /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-collapse-iterable.d.ts +0 -0
- /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-cross-join-iterable.d.ts +0 -0
- /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-delay-iterable.d.ts +0 -0
- /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-merge-iterable.d.ts +0 -0
- /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-pad-end-iterable.d.ts +0 -0
- /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-pad-start-iterable.d.ts +0 -0
- /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-repeat-iterable.d.ts +0 -0
- /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-shuffle-iterable.d.ts +0 -0
- /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-tap-iterable.d.ts +0 -0
- /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-timeout-iterable.d.ts +0 -0
- /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-when-iterable.d.ts +0 -0
- /package/dist/types/collection/async-iterable-collection/{async-iterable-helpers → _shared}/async-zip-iterable.d.ts +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IterableCollection = void 0;
|
|
4
4
|
const _module_1 = require("../../contracts/collection/_module");
|
|
5
|
-
const _module_2 = require("../../collection/iterable-collection/
|
|
5
|
+
const _module_2 = require("../../collection/iterable-collection/_shared/_module");
|
|
6
6
|
class IterableCollection {
|
|
7
7
|
iterable;
|
|
8
8
|
static THROW_ON_NUMBER_LIMIT = false;
|
|
@@ -25,34 +25,37 @@ class IterableCollection {
|
|
|
25
25
|
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
toIterator() {
|
|
29
29
|
return this[Symbol.iterator]();
|
|
30
30
|
}
|
|
31
|
-
entries(
|
|
32
|
-
return new IterableCollection(new _module_2.EntriesIterable(this,
|
|
31
|
+
entries(throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
32
|
+
return new IterableCollection(new _module_2.EntriesIterable(this, throwOnIndexOverflow));
|
|
33
33
|
}
|
|
34
|
-
keys(
|
|
35
|
-
return this.entries(
|
|
34
|
+
keys(throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
35
|
+
return this.entries(throwOnIndexOverflow).map(([key]) => key);
|
|
36
36
|
}
|
|
37
37
|
values() {
|
|
38
38
|
return this.entries().map(([_key, value]) => value);
|
|
39
39
|
}
|
|
40
|
-
filter(
|
|
41
|
-
return new IterableCollection(new _module_2.FilterIterable(this,
|
|
40
|
+
filter(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
41
|
+
return new IterableCollection(new _module_2.FilterIterable(this, predicateFn, throwOnIndexOverflow));
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
return
|
|
43
|
+
reject(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
44
|
+
return this.filter((...arguments_) => !predicateFn(...arguments_), throwOnIndexOverflow);
|
|
45
|
+
}
|
|
46
|
+
map(mapFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
47
|
+
return new IterableCollection(new _module_2.MapIterable(this, mapFn, throwOnIndexOverflow));
|
|
45
48
|
}
|
|
46
49
|
reduce(settings) {
|
|
47
50
|
try {
|
|
48
|
-
const { reduceFn: reduce, initialValue,
|
|
49
|
-
if (initialValue === undefined && this.
|
|
51
|
+
const { reduceFn: reduce, initialValue, throwOnIndexOverflow, } = settings;
|
|
52
|
+
if (initialValue === undefined && this.isEmpty()) {
|
|
50
53
|
throw new TypeError("Reduce of empty array must be inputed a initial value");
|
|
51
54
|
}
|
|
52
55
|
if (initialValue !== undefined) {
|
|
53
56
|
let output = initialValue, index = 0;
|
|
54
57
|
for (const item of this) {
|
|
55
|
-
if (
|
|
58
|
+
if (throwOnIndexOverflow &&
|
|
56
59
|
index === Number.MAX_SAFE_INTEGER) {
|
|
57
60
|
throw new _module_1.IndexOverflowError("Index has overflowed");
|
|
58
61
|
}
|
|
@@ -64,7 +67,7 @@ class IterableCollection {
|
|
|
64
67
|
let output = this.firstOrFail(), index = 0, isFirstIteration = true;
|
|
65
68
|
for (const item of this) {
|
|
66
69
|
if (!isFirstIteration) {
|
|
67
|
-
if (
|
|
70
|
+
if (throwOnIndexOverflow &&
|
|
68
71
|
index === Number.MAX_SAFE_INTEGER) {
|
|
69
72
|
throw new _module_1.IndexOverflowError("Index has overflowed");
|
|
70
73
|
}
|
|
@@ -93,7 +96,7 @@ class IterableCollection {
|
|
|
93
96
|
const separator = settings?.seperator ?? ",";
|
|
94
97
|
return str + separator + item;
|
|
95
98
|
},
|
|
96
|
-
|
|
99
|
+
throwOnIndexOverflow: settings?.throwOnIndexOverflow ??
|
|
97
100
|
IterableCollection.THROW_ON_NUMBER_LIMIT,
|
|
98
101
|
});
|
|
99
102
|
}
|
|
@@ -108,18 +111,18 @@ class IterableCollection {
|
|
|
108
111
|
collapse() {
|
|
109
112
|
return new IterableCollection(new _module_2.CollapseIterable(this));
|
|
110
113
|
}
|
|
111
|
-
flatMap(
|
|
112
|
-
return new IterableCollection(new _module_2.FlatMapIterable(this,
|
|
114
|
+
flatMap(mapFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
115
|
+
return new IterableCollection(new _module_2.FlatMapIterable(this, mapFn, throwOnIndexOverflow));
|
|
113
116
|
}
|
|
114
|
-
update(
|
|
115
|
-
return new IterableCollection(new _module_2.UpdateIterable(this,
|
|
117
|
+
update(predicateFn, mapFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
118
|
+
return new IterableCollection(new _module_2.UpdateIterable(this, predicateFn, mapFn, throwOnIndexOverflow));
|
|
116
119
|
}
|
|
117
120
|
page(settings) {
|
|
118
|
-
const { page, pageSize,
|
|
121
|
+
const { page, pageSize, throwOnIndexOverflow } = settings;
|
|
119
122
|
if (page < 0) {
|
|
120
|
-
return this.skip(page * pageSize,
|
|
123
|
+
return this.skip(page * pageSize, throwOnIndexOverflow).take(pageSize, throwOnIndexOverflow);
|
|
121
124
|
}
|
|
122
|
-
return this.skip((page - 1) * pageSize,
|
|
125
|
+
return this.skip((page - 1) * pageSize, throwOnIndexOverflow).take(page * pageSize, throwOnIndexOverflow);
|
|
123
126
|
}
|
|
124
127
|
sum() {
|
|
125
128
|
try {
|
|
@@ -160,11 +163,11 @@ class IterableCollection {
|
|
|
160
163
|
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
161
164
|
}
|
|
162
165
|
}
|
|
163
|
-
median(
|
|
164
|
-
if (this.
|
|
166
|
+
median(throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
167
|
+
if (this.isEmpty()) {
|
|
165
168
|
return 0;
|
|
166
169
|
}
|
|
167
|
-
const size = this.size(
|
|
170
|
+
const size = this.size(throwOnIndexOverflow);
|
|
168
171
|
if (size === 0) {
|
|
169
172
|
return 0;
|
|
170
173
|
}
|
|
@@ -173,13 +176,13 @@ class IterableCollection {
|
|
|
173
176
|
throw new TypeError("Item type is invalid must be number");
|
|
174
177
|
}
|
|
175
178
|
return item;
|
|
176
|
-
},
|
|
179
|
+
}, throwOnIndexOverflow)
|
|
177
180
|
.filter((_item, index) => {
|
|
178
181
|
if (isEven) {
|
|
179
182
|
return index === size / 2 || index === size / 2 - 1;
|
|
180
183
|
}
|
|
181
184
|
return index === Math.floor(size / 2);
|
|
182
|
-
},
|
|
185
|
+
}, throwOnIndexOverflow)
|
|
183
186
|
.toArray();
|
|
184
187
|
if (isEven) {
|
|
185
188
|
const [a, b] = items;
|
|
@@ -245,17 +248,17 @@ class IterableCollection {
|
|
|
245
248
|
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
246
249
|
}
|
|
247
250
|
}
|
|
248
|
-
percentage(
|
|
251
|
+
percentage(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
249
252
|
try {
|
|
250
|
-
if (this.
|
|
253
|
+
if (this.isEmpty()) {
|
|
251
254
|
return 0;
|
|
252
255
|
}
|
|
253
256
|
let part = 0, total = 0;
|
|
254
257
|
for (const item of this) {
|
|
255
|
-
if (
|
|
258
|
+
if (throwOnIndexOverflow && total === Number.MAX_SAFE_INTEGER) {
|
|
256
259
|
throw new _module_1.IndexOverflowError("The total amount has overflowed");
|
|
257
260
|
}
|
|
258
|
-
if (
|
|
261
|
+
if (predicateFn(item, total, this)) {
|
|
259
262
|
part++;
|
|
260
263
|
}
|
|
261
264
|
total++;
|
|
@@ -270,14 +273,14 @@ class IterableCollection {
|
|
|
270
273
|
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
271
274
|
}
|
|
272
275
|
}
|
|
273
|
-
some(
|
|
276
|
+
some(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
274
277
|
try {
|
|
275
278
|
let index = 0;
|
|
276
279
|
for (const item of this) {
|
|
277
|
-
if (
|
|
280
|
+
if (throwOnIndexOverflow && index === Number.MAX_SAFE_INTEGER) {
|
|
278
281
|
throw new _module_1.IndexOverflowError("Index has overflowed");
|
|
279
282
|
}
|
|
280
|
-
if (
|
|
283
|
+
if (predicateFn(item, index, this)) {
|
|
281
284
|
return true;
|
|
282
285
|
}
|
|
283
286
|
index++;
|
|
@@ -292,14 +295,14 @@ class IterableCollection {
|
|
|
292
295
|
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
293
296
|
}
|
|
294
297
|
}
|
|
295
|
-
every(
|
|
298
|
+
every(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
296
299
|
try {
|
|
297
300
|
let index = 0, isTrue = true;
|
|
298
301
|
for (const item of this) {
|
|
299
|
-
if (
|
|
302
|
+
if (throwOnIndexOverflow && index === Number.MAX_SAFE_INTEGER) {
|
|
300
303
|
throw new _module_1.IndexOverflowError("Index has overflowed");
|
|
301
304
|
}
|
|
302
|
-
isTrue &&=
|
|
305
|
+
isTrue &&= predicateFn(item, index, this);
|
|
303
306
|
if (!isTrue) {
|
|
304
307
|
break;
|
|
305
308
|
}
|
|
@@ -315,35 +318,35 @@ class IterableCollection {
|
|
|
315
318
|
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
316
319
|
}
|
|
317
320
|
}
|
|
318
|
-
take(limit,
|
|
319
|
-
return new IterableCollection(new _module_2.TakeIterable(this, limit,
|
|
321
|
+
take(limit, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
322
|
+
return new IterableCollection(new _module_2.TakeIterable(this, limit, throwOnIndexOverflow));
|
|
320
323
|
}
|
|
321
|
-
takeUntil(
|
|
322
|
-
return new IterableCollection(new _module_2.TakeUntilIterable(this,
|
|
324
|
+
takeUntil(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
325
|
+
return new IterableCollection(new _module_2.TakeUntilIterable(this, predicateFn, throwOnIndexOverflow));
|
|
323
326
|
}
|
|
324
|
-
takeWhile(
|
|
325
|
-
return this.takeUntil((...arguments_) => !
|
|
327
|
+
takeWhile(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
328
|
+
return this.takeUntil((...arguments_) => !predicateFn(...arguments_), throwOnIndexOverflow);
|
|
326
329
|
}
|
|
327
|
-
skip(offset,
|
|
328
|
-
return new IterableCollection(new _module_2.SkipIterable(this, offset,
|
|
330
|
+
skip(offset, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
331
|
+
return new IterableCollection(new _module_2.SkipIterable(this, offset, throwOnIndexOverflow));
|
|
329
332
|
}
|
|
330
|
-
skipUntil(
|
|
331
|
-
return new IterableCollection(new _module_2.SkipUntilIterable(this,
|
|
333
|
+
skipUntil(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
334
|
+
return new IterableCollection(new _module_2.SkipUntilIterable(this, predicateFn, throwOnIndexOverflow));
|
|
332
335
|
}
|
|
333
|
-
skipWhile(
|
|
334
|
-
return this.skipUntil((...arguments_) => !
|
|
336
|
+
skipWhile(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
337
|
+
return this.skipUntil((...arguments_) => !predicateFn(...arguments_), throwOnIndexOverflow);
|
|
335
338
|
}
|
|
336
339
|
when(condition, callback) {
|
|
337
340
|
return new IterableCollection(new _module_2.WhenIterable(this, () => condition, callback));
|
|
338
341
|
}
|
|
339
342
|
whenEmpty(callback) {
|
|
340
|
-
return new IterableCollection(new _module_2.WhenIterable(this, () => this.
|
|
343
|
+
return new IterableCollection(new _module_2.WhenIterable(this, () => this.isEmpty(), callback));
|
|
341
344
|
}
|
|
342
345
|
whenNot(condition, callback) {
|
|
343
346
|
return this.when(!condition, callback);
|
|
344
347
|
}
|
|
345
348
|
whenNotEmpty(callback) {
|
|
346
|
-
return new IterableCollection(new _module_2.WhenIterable(this, () => this.
|
|
349
|
+
return new IterableCollection(new _module_2.WhenIterable(this, () => this.isNotEmpty(), callback));
|
|
347
350
|
}
|
|
348
351
|
pipe(callback) {
|
|
349
352
|
try {
|
|
@@ -363,37 +366,37 @@ class IterableCollection {
|
|
|
363
366
|
chunk(chunkSize) {
|
|
364
367
|
return new IterableCollection(new _module_2.ChunkIterable(this, chunkSize, IterableCollection.makeCollection));
|
|
365
368
|
}
|
|
366
|
-
chunkWhile(
|
|
367
|
-
return new IterableCollection(new _module_2.ChunkWhileIterable(this,
|
|
369
|
+
chunkWhile(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
370
|
+
return new IterableCollection(new _module_2.ChunkWhileIterable(this, predicateFn, throwOnIndexOverflow, (iterable) => new IterableCollection(iterable)));
|
|
368
371
|
}
|
|
369
|
-
split(chunkAmount,
|
|
370
|
-
return new IterableCollection(new _module_2.SplitIterable(this, chunkAmount,
|
|
372
|
+
split(chunkAmount, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
373
|
+
return new IterableCollection(new _module_2.SplitIterable(this, chunkAmount, throwOnIndexOverflow, IterableCollection.makeCollection));
|
|
371
374
|
}
|
|
372
|
-
partition(
|
|
373
|
-
return new IterableCollection(new _module_2.PartionIterable(this,
|
|
375
|
+
partition(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
376
|
+
return new IterableCollection(new _module_2.PartionIterable(this, predicateFn, throwOnIndexOverflow, IterableCollection.makeCollection));
|
|
374
377
|
}
|
|
375
378
|
sliding(settings) {
|
|
376
|
-
const { chunkSize, step = chunkSize - 1,
|
|
377
|
-
return new IterableCollection(new _module_2.SlidingIteralbe(this, chunkSize, step,
|
|
379
|
+
const { chunkSize, step = chunkSize - 1, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT, } = settings;
|
|
380
|
+
return new IterableCollection(new _module_2.SlidingIteralbe(this, chunkSize, step, throwOnIndexOverflow));
|
|
378
381
|
}
|
|
379
382
|
groupBy(settings) {
|
|
380
|
-
return new IterableCollection(new _module_2.GroupByIterable(this, settings?.
|
|
383
|
+
return new IterableCollection(new _module_2.GroupByIterable(this, settings?.selectFn, settings?.throwOnIndexOverflow ??
|
|
381
384
|
IterableCollection.THROW_ON_NUMBER_LIMIT, (iterable) => new IterableCollection(iterable)));
|
|
382
385
|
}
|
|
383
386
|
countBy(settings) {
|
|
384
|
-
return new IterableCollection(new _module_2.CountByIterable(this, settings?.
|
|
387
|
+
return new IterableCollection(new _module_2.CountByIterable(this, settings?.selectFn, settings?.throwOnIndexOverflow ??
|
|
385
388
|
IterableCollection.THROW_ON_NUMBER_LIMIT));
|
|
386
389
|
}
|
|
387
390
|
unique(settings) {
|
|
388
|
-
return new IterableCollection(new _module_2.UniqueIterable(this, settings?.
|
|
391
|
+
return new IterableCollection(new _module_2.UniqueIterable(this, settings?.selectFn, settings?.throwOnIndexOverflow ??
|
|
389
392
|
IterableCollection.THROW_ON_NUMBER_LIMIT));
|
|
390
393
|
}
|
|
391
|
-
difference(iterable,
|
|
394
|
+
difference(iterable, mapFn = (item) => item) {
|
|
392
395
|
const differenceCollection = new IterableCollection(iterable);
|
|
393
396
|
return this.filter((item, index, collection) => {
|
|
394
397
|
return !differenceCollection.some((matchItem, matchIndex, matchCollection) => {
|
|
395
|
-
return (
|
|
396
|
-
|
|
398
|
+
return (mapFn(item, index, collection) ===
|
|
399
|
+
mapFn(matchItem, matchIndex, matchCollection));
|
|
397
400
|
});
|
|
398
401
|
});
|
|
399
402
|
}
|
|
@@ -407,7 +410,7 @@ class IterableCollection {
|
|
|
407
410
|
return new IterableCollection(new _module_2.PadEndIterable(this, maxLength, fillItems, IterableCollection.makeCollection));
|
|
408
411
|
}
|
|
409
412
|
slice(settings) {
|
|
410
|
-
return new IterableCollection(new _module_2.SliceIterable(this, settings?.start, settings?.end, settings?.
|
|
413
|
+
return new IterableCollection(new _module_2.SliceIterable(this, settings?.start, settings?.end, settings?.throwOnIndexOverflow ??
|
|
411
414
|
IterableCollection.THROW_ON_NUMBER_LIMIT));
|
|
412
415
|
}
|
|
413
416
|
prepend(iterable) {
|
|
@@ -416,11 +419,11 @@ class IterableCollection {
|
|
|
416
419
|
append(iterable) {
|
|
417
420
|
return new IterableCollection(new _module_2.MergeIterable(this, iterable));
|
|
418
421
|
}
|
|
419
|
-
insertBefore(
|
|
420
|
-
return new IterableCollection(new _module_2.InsertBeforeIterable(this,
|
|
422
|
+
insertBefore(predicateFn, iterable, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
423
|
+
return new IterableCollection(new _module_2.InsertBeforeIterable(this, predicateFn, iterable, throwOnIndexOverflow));
|
|
421
424
|
}
|
|
422
|
-
insertAfter(
|
|
423
|
-
return new IterableCollection(new _module_2.InsertAfterIterable(this,
|
|
425
|
+
insertAfter(predicateFn, iterable, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
426
|
+
return new IterableCollection(new _module_2.InsertAfterIterable(this, predicateFn, iterable, throwOnIndexOverflow));
|
|
424
427
|
}
|
|
425
428
|
crossJoin(...iterables) {
|
|
426
429
|
return new IterableCollection(new _module_2.CrossJoinIterable(this, iterables, IterableCollection.makeCollection));
|
|
@@ -428,11 +431,11 @@ class IterableCollection {
|
|
|
428
431
|
zip(iterable) {
|
|
429
432
|
return new IterableCollection(new _module_2.ZipIterable(this, iterable));
|
|
430
433
|
}
|
|
431
|
-
sort(
|
|
432
|
-
return new IterableCollection(new _module_2.SortIterable(this,
|
|
434
|
+
sort(comparator) {
|
|
435
|
+
return new IterableCollection(new _module_2.SortIterable(this, comparator));
|
|
433
436
|
}
|
|
434
437
|
reverse(settings) {
|
|
435
|
-
return new IterableCollection(new _module_2.ReverseIterable(this, settings?.chunkSize ?? IterableCollection.DEFAULT_CHUNK_SIZE, settings?.
|
|
438
|
+
return new IterableCollection(new _module_2.ReverseIterable(this, settings?.chunkSize ?? IterableCollection.DEFAULT_CHUNK_SIZE, settings?.throwOnIndexOverflow ??
|
|
436
439
|
IterableCollection.THROW_ON_NUMBER_LIMIT, (iterable) => new IterableCollection(iterable)));
|
|
437
440
|
}
|
|
438
441
|
shuffle() {
|
|
@@ -455,15 +458,15 @@ class IterableCollection {
|
|
|
455
458
|
}
|
|
456
459
|
firstOr(settings) {
|
|
457
460
|
try {
|
|
458
|
-
const
|
|
461
|
+
const throwOnIndexOverflow = settings.throwOnIndexOverflow ??
|
|
459
462
|
IterableCollection.THROW_ON_NUMBER_LIMIT;
|
|
460
463
|
let index = 0;
|
|
461
|
-
const
|
|
464
|
+
const predicateFn = settings.predicateFn ?? (() => true);
|
|
462
465
|
for (const item of this) {
|
|
463
|
-
if (
|
|
466
|
+
if (throwOnIndexOverflow && index === Number.MAX_SAFE_INTEGER) {
|
|
464
467
|
throw new _module_1.IndexOverflowError("Index has overflowed");
|
|
465
468
|
}
|
|
466
|
-
if (
|
|
469
|
+
if (predicateFn(item, index, this)) {
|
|
467
470
|
return item;
|
|
468
471
|
}
|
|
469
472
|
index++;
|
|
@@ -506,16 +509,16 @@ class IterableCollection {
|
|
|
506
509
|
}
|
|
507
510
|
lastOr(settings) {
|
|
508
511
|
try {
|
|
509
|
-
const
|
|
512
|
+
const throwOnIndexOverflow = settings.throwOnIndexOverflow ??
|
|
510
513
|
IterableCollection.THROW_ON_NUMBER_LIMIT;
|
|
511
514
|
let index = 0;
|
|
512
|
-
const
|
|
515
|
+
const predicateFn = settings.predicateFn ?? (() => true);
|
|
513
516
|
let matchedItem = null;
|
|
514
517
|
for (const item of this) {
|
|
515
|
-
if (
|
|
518
|
+
if (throwOnIndexOverflow && index === Number.MAX_SAFE_INTEGER) {
|
|
516
519
|
throw new _module_1.IndexOverflowError("Index has overflowed");
|
|
517
520
|
}
|
|
518
|
-
if (
|
|
521
|
+
if (predicateFn(item, index, this)) {
|
|
519
522
|
matchedItem = item;
|
|
520
523
|
}
|
|
521
524
|
index++;
|
|
@@ -544,17 +547,17 @@ class IterableCollection {
|
|
|
544
547
|
}
|
|
545
548
|
return item;
|
|
546
549
|
}
|
|
547
|
-
before(
|
|
548
|
-
return this.beforeOr(null,
|
|
550
|
+
before(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
551
|
+
return this.beforeOr(null, predicateFn, throwOnIndexOverflow);
|
|
549
552
|
}
|
|
550
|
-
beforeOr(defaultValue,
|
|
553
|
+
beforeOr(defaultValue, predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
551
554
|
try {
|
|
552
555
|
let beforeItem = null, index = 0;
|
|
553
556
|
for (const item of this) {
|
|
554
|
-
if (
|
|
557
|
+
if (throwOnIndexOverflow && index === Number.MAX_SAFE_INTEGER) {
|
|
555
558
|
throw new _module_1.IndexOverflowError("Index has overflowed");
|
|
556
559
|
}
|
|
557
|
-
if (
|
|
560
|
+
if (predicateFn(item, index, this) && beforeItem) {
|
|
558
561
|
return beforeItem;
|
|
559
562
|
}
|
|
560
563
|
index++;
|
|
@@ -574,27 +577,27 @@ class IterableCollection {
|
|
|
574
577
|
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
575
578
|
}
|
|
576
579
|
}
|
|
577
|
-
beforeOrFail(
|
|
578
|
-
const item = this.before(
|
|
580
|
+
beforeOrFail(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
581
|
+
const item = this.before(predicateFn, throwOnIndexOverflow);
|
|
579
582
|
if (item === null) {
|
|
580
583
|
throw new _module_1.ItemNotFoundError("Item was not found");
|
|
581
584
|
}
|
|
582
585
|
return item;
|
|
583
586
|
}
|
|
584
|
-
after(
|
|
585
|
-
return this.afterOr(null,
|
|
587
|
+
after(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
588
|
+
return this.afterOr(null, predicateFn, throwOnIndexOverflow);
|
|
586
589
|
}
|
|
587
|
-
afterOr(defaultValue,
|
|
590
|
+
afterOr(defaultValue, predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
588
591
|
try {
|
|
589
592
|
let hasMatched = false, index = 0;
|
|
590
593
|
for (const item of this) {
|
|
591
594
|
if (hasMatched) {
|
|
592
595
|
return item;
|
|
593
596
|
}
|
|
594
|
-
if (
|
|
597
|
+
if (throwOnIndexOverflow && index === Number.MAX_SAFE_INTEGER) {
|
|
595
598
|
throw new _module_1.IndexOverflowError("Index has overflowed");
|
|
596
599
|
}
|
|
597
|
-
hasMatched =
|
|
600
|
+
hasMatched = predicateFn(item, index, this);
|
|
598
601
|
index++;
|
|
599
602
|
}
|
|
600
603
|
if (typeof defaultValue === "function") {
|
|
@@ -611,21 +614,21 @@ class IterableCollection {
|
|
|
611
614
|
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
612
615
|
}
|
|
613
616
|
}
|
|
614
|
-
afterOrFail(
|
|
615
|
-
const item = this.after(
|
|
617
|
+
afterOrFail(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
618
|
+
const item = this.after(predicateFn, throwOnIndexOverflow);
|
|
616
619
|
if (item === null) {
|
|
617
620
|
throw new _module_1.ItemNotFoundError("Item was not found");
|
|
618
621
|
}
|
|
619
622
|
return item;
|
|
620
623
|
}
|
|
621
|
-
sole(
|
|
624
|
+
sole(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
622
625
|
try {
|
|
623
626
|
let index = 0, matchedItem = null;
|
|
624
627
|
for (const item of this) {
|
|
625
|
-
if (
|
|
628
|
+
if (throwOnIndexOverflow && index === Number.MAX_SAFE_INTEGER) {
|
|
626
629
|
throw new _module_1.IndexOverflowError("Index has overflowed");
|
|
627
630
|
}
|
|
628
|
-
if (
|
|
631
|
+
if (predicateFn(item, index, this)) {
|
|
629
632
|
if (matchedItem !== null) {
|
|
630
633
|
throw new _module_1.MultipleItemsFoundError("Multiple items were found");
|
|
631
634
|
}
|
|
@@ -649,14 +652,14 @@ class IterableCollection {
|
|
|
649
652
|
nth(step) {
|
|
650
653
|
return this.filter((_item, index) => index % step === 0);
|
|
651
654
|
}
|
|
652
|
-
count(
|
|
655
|
+
count(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
653
656
|
try {
|
|
654
657
|
let size = 0;
|
|
655
658
|
for (const item of this) {
|
|
656
|
-
if (
|
|
659
|
+
if (throwOnIndexOverflow && size === Number.MAX_SAFE_INTEGER) {
|
|
657
660
|
throw new _module_1.IndexOverflowError("Size has overflowed");
|
|
658
661
|
}
|
|
659
|
-
if (
|
|
662
|
+
if (predicateFn(item, size, this)) {
|
|
660
663
|
size++;
|
|
661
664
|
}
|
|
662
665
|
}
|
|
@@ -670,10 +673,10 @@ class IterableCollection {
|
|
|
670
673
|
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
671
674
|
}
|
|
672
675
|
}
|
|
673
|
-
size(
|
|
674
|
-
return this.count(() => true,
|
|
676
|
+
size(throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
677
|
+
return this.count(() => true, throwOnIndexOverflow);
|
|
675
678
|
}
|
|
676
|
-
|
|
679
|
+
isEmpty() {
|
|
677
680
|
try {
|
|
678
681
|
for (const _ of this) {
|
|
679
682
|
return false;
|
|
@@ -688,17 +691,17 @@ class IterableCollection {
|
|
|
688
691
|
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
689
692
|
}
|
|
690
693
|
}
|
|
691
|
-
|
|
692
|
-
return !this.
|
|
694
|
+
isNotEmpty() {
|
|
695
|
+
return !this.isEmpty();
|
|
693
696
|
}
|
|
694
|
-
|
|
697
|
+
searchFirst(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
695
698
|
try {
|
|
696
699
|
let index = 0;
|
|
697
700
|
for (const item of this) {
|
|
698
|
-
if (
|
|
701
|
+
if (throwOnIndexOverflow && index === Number.MAX_SAFE_INTEGER) {
|
|
699
702
|
throw new _module_1.IndexOverflowError("Index has overflowed");
|
|
700
703
|
}
|
|
701
|
-
if (
|
|
704
|
+
if (predicateFn(item, index, this)) {
|
|
702
705
|
return index;
|
|
703
706
|
}
|
|
704
707
|
index++;
|
|
@@ -713,11 +716,34 @@ class IterableCollection {
|
|
|
713
716
|
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
714
717
|
}
|
|
715
718
|
}
|
|
716
|
-
|
|
719
|
+
searchLast(predicateFn, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
720
|
+
try {
|
|
721
|
+
let index = 0;
|
|
722
|
+
let matchedIndex = -1;
|
|
723
|
+
for (const item of this) {
|
|
724
|
+
if (throwOnIndexOverflow && index === Number.MAX_SAFE_INTEGER) {
|
|
725
|
+
throw new _module_1.IndexOverflowError("Index has overflowed");
|
|
726
|
+
}
|
|
727
|
+
if (predicateFn(item, index, this)) {
|
|
728
|
+
matchedIndex = index;
|
|
729
|
+
}
|
|
730
|
+
index++;
|
|
731
|
+
}
|
|
732
|
+
return matchedIndex;
|
|
733
|
+
}
|
|
734
|
+
catch (error) {
|
|
735
|
+
if (error instanceof _module_1.CollectionError ||
|
|
736
|
+
error instanceof TypeError) {
|
|
737
|
+
throw error;
|
|
738
|
+
}
|
|
739
|
+
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
forEach(callback, throwOnIndexOverflow = IterableCollection.THROW_ON_NUMBER_LIMIT) {
|
|
717
743
|
try {
|
|
718
744
|
let index = 0;
|
|
719
745
|
for (const item of this) {
|
|
720
|
-
if (
|
|
746
|
+
if (throwOnIndexOverflow && index === Number.MAX_SAFE_INTEGER) {
|
|
721
747
|
throw new _module_1.IndexOverflowError("Index has overflowed");
|
|
722
748
|
}
|
|
723
749
|
callback(item, index, this);
|