@daiso-tech/core 0.4.0 → 0.6.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/async/_module.js +1 -0
- package/dist/cjs/async/_module.js.map +1 -1
- 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/memory-storage-adapter/memory-storage-adapter.js +23 -0
- package/dist/cjs/storage/memory-storage-adapter/memory-storage-adapter.js.map +1 -1
- package/dist/cjs/storage/mongodb-storage-adapter/mongodb-storage-adapter.js +0 -70
- package/dist/cjs/storage/mongodb-storage-adapter/mongodb-storage-adapter.js.map +1 -1
- package/dist/cjs/storage/namespace-storage-adapter.js +11 -21
- package/dist/cjs/storage/namespace-storage-adapter.js.map +1 -1
- package/dist/cjs/storage/redis-storage-adapter/redis-storage-adapter.js +0 -20
- package/dist/cjs/storage/redis-storage-adapter/redis-storage-adapter.js.map +1 -1
- package/dist/cjs/storage/sqlite/_shared/base-sqlite-storage-adapter.js +0 -34
- package/dist/cjs/storage/sqlite/_shared/base-sqlite-storage-adapter.js.map +1 -1
- package/dist/cjs/storage/storage.js +104 -188
- package/dist/cjs/storage/storage.js.map +1 -1
- package/dist/esm/async/_module.js +1 -0
- package/dist/esm/async/_module.js.map +1 -1
- 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/memory-storage-adapter/memory-storage-adapter.js +23 -0
- package/dist/esm/storage/memory-storage-adapter/memory-storage-adapter.js.map +1 -1
- package/dist/esm/storage/mongodb-storage-adapter/mongodb-storage-adapter.js +0 -70
- package/dist/esm/storage/mongodb-storage-adapter/mongodb-storage-adapter.js.map +1 -1
- package/dist/esm/storage/namespace-storage-adapter.js +11 -21
- package/dist/esm/storage/namespace-storage-adapter.js.map +1 -1
- package/dist/esm/storage/redis-storage-adapter/redis-storage-adapter.js +0 -20
- package/dist/esm/storage/redis-storage-adapter/redis-storage-adapter.js.map +1 -1
- package/dist/esm/storage/sqlite/_shared/base-sqlite-storage-adapter.js +0 -34
- package/dist/esm/storage/sqlite/_shared/base-sqlite-storage-adapter.js.map +1 -1
- package/dist/esm/storage/storage.js +105 -189
- package/dist/esm/storage/storage.js.map +1 -1
- package/dist/types/_shared/types.d.ts +2 -6
- package/dist/types/async/_module.d.ts +1 -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-adapter.contract.d.ts +7 -26
- package/dist/types/contracts/storage/storage.contract.d.ts +22 -22
- package/dist/types/storage/memory-storage-adapter/memory-storage-adapter.d.ts +2 -0
- package/dist/types/storage/mongodb-storage-adapter/mongodb-storage-adapter.d.ts +0 -3
- package/dist/types/storage/namespace-storage-adapter.d.ts +2 -7
- package/dist/types/storage/redis-storage-adapter/redis-storage-adapter.d.ts +0 -3
- package/dist/types/storage/sqlite/_shared/base-sqlite-storage-adapter.d.ts +0 -3
- package/dist/types/storage/storage.d.ts +24 -23
- 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/cjs/storage/usable-storage-adapter.js +0 -102
- package/dist/cjs/storage/usable-storage-adapter.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/esm/storage/usable-storage-adapter.js +0 -98
- package/dist/esm/storage/usable-storage-adapter.js.map +0 -1
- package/dist/types/collection/async-iterable-collection/_shared/async-abort-iterable.d.ts +0 -10
- package/dist/types/collection/async-iterable-collection/_shared/async-delay-iterable.d.ts +0 -10
- package/dist/types/collection/async-iterable-collection/_shared/async-timeout-iterable.d.ts +0 -10
- package/dist/types/storage/usable-storage-adapter.d.ts +0 -22
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.unstable_retryIterable = void 0;
|
|
18
|
+
__exportStar(require("../async/_shared"), exports);
|
|
18
19
|
__exportStar(require("../async/abortable/_module"), exports);
|
|
19
20
|
__exportStar(require("../async/abortable-iterable/_module"), exports);
|
|
20
21
|
__exportStar(require("../async/backof-policies/_module"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../src/async/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,qEAAmD;AACnD,kEAAgD;AAChD,wDAAsC;AACtC,iEAA+C;AAC/C,+DAA6C;AAC7C,wDAAsC;AACtC,0DAAyF;AAAhF,iHAAA,aAAa,OAA0B;AAChD,0DAAwC;AACxC,mEAAiD"}
|
|
1
|
+
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../src/async/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,4DAA0C;AAC1C,qEAAmD;AACnD,kEAAgD;AAChD,wDAAsC;AACtC,iEAA+C;AAC/C,+DAA6C;AAC7C,wDAAsC;AACtC,0DAAyF;AAAhF,iHAAA,aAAa,OAA0B;AAChD,0DAAwC;AACxC,mEAAiD"}
|
|
@@ -20,6 +20,7 @@ __exportStar(require("../../../collection/async-iterable-collection/_shared/asyn
|
|
|
20
20
|
__exportStar(require("../../../collection/async-iterable-collection/_shared/async-count-by-iterable"), exports);
|
|
21
21
|
__exportStar(require("../../../collection/async-iterable-collection/_shared/async-cross-join-iterable"), exports);
|
|
22
22
|
__exportStar(require("../../../collection/async-iterable-collection/_shared/async-entries-iterable"), exports);
|
|
23
|
+
__exportStar(require("../../../collection/async-iterable-collection/_shared/async-error-handler-iterable"), exports);
|
|
23
24
|
__exportStar(require("../../../collection/async-iterable-collection/_shared/async-filter-iterable"), exports);
|
|
24
25
|
__exportStar(require("../../../collection/async-iterable-collection/_shared/async-flat-map-iterable"), exports);
|
|
25
26
|
__exportStar(require("../../../collection/async-iterable-collection/_shared/async-group-by-iterable"), exports);
|
|
@@ -46,7 +47,4 @@ __exportStar(require("../../../collection/async-iterable-collection/_shared/asyn
|
|
|
46
47
|
__exportStar(require("../../../collection/async-iterable-collection/_shared/async-update-iterable"), exports);
|
|
47
48
|
__exportStar(require("../../../collection/async-iterable-collection/_shared/async-when-iterable"), exports);
|
|
48
49
|
__exportStar(require("../../../collection/async-iterable-collection/_shared/async-zip-iterable"), exports);
|
|
49
|
-
__exportStar(require("../../../collection/async-iterable-collection/_shared/async-timeout-iterable"), exports);
|
|
50
|
-
__exportStar(require("../../../collection/async-iterable-collection/_shared/async-delay-iterable"), exports);
|
|
51
|
-
__exportStar(require("../../../collection/async-iterable-collection/_shared/async-abort-iterable"), exports);
|
|
52
50
|
//# sourceMappingURL=_module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sGAAoF;AACpF,4GAA0F;AAC1F,yGAAuF;AACvF,yGAAuF;AACvF,2GAAyF;AACzF,wGAAsF;AACtF,uGAAqF;AACrF,yGAAuF;AACvF,yGAAuF;AACvF,6GAA2F;AAC3F,8GAA4F;AAC5F,oGAAkF;AAClF,sGAAoF;AACpF,wGAAsF;AACtF,0GAAwF;AACxF,wGAAsF;AACtF,uGAAqF;AACrF,wGAAsF;AACtF,wGAAsF;AACtF,qGAAmF;AACnF,2GAAyF;AACzF,sGAAoF;AACpF,wGAAsF;AACtF,qGAAmF;AACnF,sGAAoF;AACpF,qGAAmF;AACnF,2GAAyF;AACzF,oGAAkF;AAClF,uGAAqF;AACrF,uGAAqF;AACrF,qGAAmF;AACnF,oGAAkF
|
|
1
|
+
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/_module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sGAAoF;AACpF,4GAA0F;AAC1F,yGAAuF;AACvF,yGAAuF;AACvF,2GAAyF;AACzF,wGAAsF;AACtF,8GAA4F;AAC5F,uGAAqF;AACrF,yGAAuF;AACvF,yGAAuF;AACvF,6GAA2F;AAC3F,8GAA4F;AAC5F,oGAAkF;AAClF,sGAAoF;AACpF,wGAAsF;AACtF,0GAAwF;AACxF,wGAAsF;AACtF,uGAAqF;AACrF,wGAAsF;AACtF,wGAAsF;AACtF,qGAAmF;AACnF,2GAAyF;AACzF,sGAAoF;AACpF,wGAAsF;AACtF,qGAAmF;AACnF,sGAAoF;AACpF,qGAAmF;AACnF,2GAAyF;AACzF,oGAAkF;AAClF,uGAAqF;AACrF,uGAAqF;AACrF,qGAAmF;AACnF,oGAAkF"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncChunkIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncChunkIterable {
|
|
6
5
|
collection;
|
|
7
6
|
chunkSize;
|
|
@@ -12,31 +11,23 @@ class AsyncChunkIterable {
|
|
|
12
11
|
this.makeCollection = makeCollection;
|
|
13
12
|
}
|
|
14
13
|
async *[Symbol.asyncIterator]() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (!isFirstIteration && isFilled) {
|
|
23
|
-
yield this.makeCollection(array);
|
|
24
|
-
array.length = 0;
|
|
25
|
-
}
|
|
26
|
-
array.push(item);
|
|
27
|
-
currentChunkSize++;
|
|
28
|
-
isFirstIteration = false;
|
|
29
|
-
}
|
|
30
|
-
const hasRest = currentChunkSize !== 0;
|
|
31
|
-
if (hasRest) {
|
|
14
|
+
const array = [];
|
|
15
|
+
let currentChunkSize = 0;
|
|
16
|
+
let isFirstIteration = true;
|
|
17
|
+
for await (const item of this.collection) {
|
|
18
|
+
currentChunkSize %= this.chunkSize;
|
|
19
|
+
const isFilled = currentChunkSize === 0;
|
|
20
|
+
if (!isFirstIteration && isFilled) {
|
|
32
21
|
yield this.makeCollection(array);
|
|
22
|
+
array.length = 0;
|
|
33
23
|
}
|
|
24
|
+
array.push(item);
|
|
25
|
+
currentChunkSize++;
|
|
26
|
+
isFirstIteration = false;
|
|
34
27
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
28
|
+
const hasRest = currentChunkSize !== 0;
|
|
29
|
+
if (hasRest) {
|
|
30
|
+
yield this.makeCollection(array);
|
|
40
31
|
}
|
|
41
32
|
}
|
|
42
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-chunk-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-chunk-iterable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"async-chunk-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-chunk-iterable.ts"],"names":[],"mappings":";;;AAMA,MAAa,kBAAkB;IAIf;IACA;IACA;IAHZ,YACY,UAAoC,EACpC,SAAiB,EACjB,cAEqB;QAJrB,eAAU,GAAV,UAAU,CAA0B;QACpC,cAAS,GAAT,SAAS,CAAQ;QACjB,mBAAc,GAAd,cAAc,CAEO;IAC9B,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,IAAI,gBAAgB,GAAG,CAAC,CAAC;QACzB,IAAI,gBAAgB,GAAG,IAAI,CAAC;QAC5B,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACvC,gBAAgB,IAAI,IAAI,CAAC,SAAS,CAAC;YACnC,MAAM,QAAQ,GAAG,gBAAgB,KAAK,CAAC,CAAC;YACxC,IAAI,CAAC,gBAAgB,IAAI,QAAQ,EAAE,CAAC;gBAChC,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;gBACjC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;YACrB,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjB,gBAAgB,EAAE,CAAC;YACnB,gBAAgB,GAAG,KAAK,CAAC;QAC7B,CAAC;QACD,MAAM,OAAO,GAAG,gBAAgB,KAAK,CAAC,CAAC;QACvC,IAAI,OAAO,EAAE,CAAC;YACV,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QACrC,CAAC;IACL,CAAC;CACJ;AA/BD,gDA+BC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncChunkWhileIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncChunkWhileIterable {
|
|
6
5
|
collection;
|
|
7
6
|
predicateFn;
|
|
@@ -12,29 +11,21 @@ class AsyncChunkWhileIterable {
|
|
|
12
11
|
this.makeCollection = makeCollection;
|
|
13
12
|
}
|
|
14
13
|
async *[Symbol.asyncIterator]() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
array.push(item);
|
|
20
|
-
}
|
|
21
|
-
else if (await this.predicateFn(item, index, this.makeCollection(array))) {
|
|
22
|
-
array.push(item);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
yield this.makeCollection(array);
|
|
26
|
-
array.length = 0;
|
|
27
|
-
array.push(item);
|
|
28
|
-
}
|
|
14
|
+
const array = [];
|
|
15
|
+
for await (const [index, item] of this.collection.entries()) {
|
|
16
|
+
if (index === 0) {
|
|
17
|
+
array.push(item);
|
|
29
18
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
19
|
+
else if (await this.predicateFn(item, index, this.makeCollection(array))) {
|
|
20
|
+
array.push(item);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
yield this.makeCollection(array);
|
|
24
|
+
array.length = 0;
|
|
25
|
+
array.push(item);
|
|
35
26
|
}
|
|
36
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
37
27
|
}
|
|
28
|
+
yield this.makeCollection(array);
|
|
38
29
|
}
|
|
39
30
|
}
|
|
40
31
|
exports.AsyncChunkWhileIterable = AsyncChunkWhileIterable;
|
package/dist/cjs/collection/async-iterable-collection/_shared/async-chunk-while-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-chunk-while-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-chunk-while-iterable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"async-chunk-while-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-chunk-while-iterable.ts"],"names":[],"mappings":";;;AASA,MAAa,uBAAuB;IAIpB;IACA;IAEA;IAJZ,YACY,UAAoC,EACpC,WAA6D,EAE7D,cAEqB;QALrB,eAAU,GAAV,UAAU,CAA0B;QACpC,gBAAW,GAAX,WAAW,CAAkD;QAE7D,mBAAc,GAAd,cAAc,CAEO;IAC9B,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,IAAI,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YAC1D,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;gBACd,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;iBAAM,IACH,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EACjE,CAAC;gBACC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;iBAAM,CAAC;gBACJ,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;gBACjC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;gBACjB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;QACL,CAAC;QACD,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;CACJ;AA7BD,0DA6BC"}
|
|
@@ -2,28 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncCollapseIterable = void 0;
|
|
4
4
|
const _shared_1 = require("../../../collection/_shared");
|
|
5
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
6
5
|
class AsyncCollapseIterable {
|
|
7
6
|
collection;
|
|
8
7
|
constructor(collection) {
|
|
9
8
|
this.collection = collection;
|
|
10
9
|
}
|
|
11
10
|
async *[Symbol.asyncIterator]() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
yield* item;
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
yield item;
|
|
19
|
-
}
|
|
11
|
+
for await (const item of this.collection) {
|
|
12
|
+
if ((0, _shared_1.isIterable)(item) || (0, _shared_1.isAsyncIterable)(item)) {
|
|
13
|
+
yield* item;
|
|
20
14
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (error instanceof _module_1.CollectionError) {
|
|
24
|
-
throw error;
|
|
15
|
+
else {
|
|
16
|
+
yield item;
|
|
25
17
|
}
|
|
26
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
27
18
|
}
|
|
28
19
|
}
|
|
29
20
|
}
|
package/dist/cjs/collection/async-iterable-collection/_shared/async-collapse-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-collapse-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-collapse-iterable.ts"],"names":[],"mappings":";;;AAAA,kDAAmE;
|
|
1
|
+
{"version":3,"file":"async-collapse-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-collapse-iterable.ts"],"names":[],"mappings":";;;AAAA,kDAAmE;AASnE,MAAa,qBAAqB;IAGV;IAApB,YAAoB,UAAoC;QAApC,eAAU,GAAV,UAAU,CAA0B;IAAG,CAAC;IAE5D,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACvC,IAAI,IAAA,oBAAU,EAAS,IAAI,CAAC,IAAI,IAAA,yBAAe,EAAS,IAAI,CAAC,EAAE,CAAC;gBAE5D,KAAK,CAAC,CAAC,IAAW,CAAC;YACvB,CAAC;iBAAM,CAAC;gBACJ,MAAM,IAA6B,CAAC;YACxC,CAAC;QACL,CAAC;IACL,CAAC;CACJ;AAfD,sDAeC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncCountByIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncCountByIterable {
|
|
6
5
|
collection;
|
|
7
6
|
callback;
|
|
@@ -10,26 +9,18 @@ class AsyncCountByIterable {
|
|
|
10
9
|
this.callback = callback;
|
|
11
10
|
}
|
|
12
11
|
async *[Symbol.asyncIterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
map.set(key, 0);
|
|
19
|
-
}
|
|
20
|
-
const counter = map.get(key);
|
|
21
|
-
if (counter !== undefined) {
|
|
22
|
-
map.set(key, counter + 1);
|
|
23
|
-
}
|
|
12
|
+
const map = new Map();
|
|
13
|
+
for await (const [index, item] of this.collection.entries()) {
|
|
14
|
+
const key = await this.callback(item, index, this.collection);
|
|
15
|
+
if (!map.has(key)) {
|
|
16
|
+
map.set(key, 0);
|
|
24
17
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if (error instanceof _module_1.CollectionError) {
|
|
29
|
-
throw error;
|
|
18
|
+
const counter = map.get(key);
|
|
19
|
+
if (counter !== undefined) {
|
|
20
|
+
map.set(key, counter + 1);
|
|
30
21
|
}
|
|
31
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
32
22
|
}
|
|
23
|
+
yield* map;
|
|
33
24
|
}
|
|
34
25
|
}
|
|
35
26
|
exports.AsyncCountByIterable = AsyncCountByIterable;
|
package/dist/cjs/collection/async-iterable-collection/_shared/async-count-by-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-count-by-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-count-by-iterable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"async-count-by-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-count-by-iterable.ts"],"names":[],"mappings":";;;AAQA,MAAa,oBAAoB;IAIjB;IACA;IAFZ,YACY,UAAoC,EACpC,WAIJ,CAAC,IAAI,EAAE,EAAE,CAET,IAAW;QAPP,eAAU,GAAV,UAAU,CAA0B;QACpC,aAAQ,GAAR,QAAQ,CAMD;IAChB,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QAGzB,MAAM,GAAG,GAAG,IAAI,GAAG,EAAmB,CAAC;QACvC,IAAI,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YAC1D,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;YAC9D,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBAChB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACpB,CAAC;YACD,MAAM,OAAO,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBACxB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC;YAC9B,CAAC;QACL,CAAC;QACD,KAAK,CAAC,CAAC,GAAG,CAAC;IACf,CAAC;CACJ;AA9BD,oDA8BC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncCrossJoinIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../
|
|
5
|
-
const _module_2 = require("../../../collection/_module");
|
|
4
|
+
const _module_1 = require("../../../collection/_module");
|
|
6
5
|
class AsyncCrossJoinIterable {
|
|
7
6
|
collection;
|
|
8
7
|
iterable;
|
|
@@ -13,31 +12,23 @@ class AsyncCrossJoinIterable {
|
|
|
13
12
|
this.makeCollection = makeCollection;
|
|
14
13
|
}
|
|
15
14
|
async *[Symbol.asyncIterator]() {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
yield* combinations;
|
|
34
|
-
}
|
|
35
|
-
catch (error) {
|
|
36
|
-
if (error instanceof _module_1.CollectionError) {
|
|
37
|
-
throw error;
|
|
38
|
-
}
|
|
39
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
40
|
-
}
|
|
15
|
+
const combinations = (await this.makeCollection([
|
|
16
|
+
this.collection,
|
|
17
|
+
this.makeCollection(this.iterable),
|
|
18
|
+
]).reduce(async (a, b) => {
|
|
19
|
+
return await a
|
|
20
|
+
.map((x) => {
|
|
21
|
+
return b.map((y) => {
|
|
22
|
+
return [...x, y];
|
|
23
|
+
});
|
|
24
|
+
})
|
|
25
|
+
.reduce((c, b) => c.append(b), this.makeCollection([]));
|
|
26
|
+
}, this.makeCollection([[]]))).map((combination) => {
|
|
27
|
+
return combination.reduce((a, b) => {
|
|
28
|
+
return [...a, ...((0, _module_1.isIterable)(b) ? b : [b])];
|
|
29
|
+
}, []);
|
|
30
|
+
});
|
|
31
|
+
yield* combinations;
|
|
41
32
|
}
|
|
42
33
|
}
|
|
43
34
|
exports.AsyncCrossJoinIterable = AsyncCrossJoinIterable;
|
package/dist/cjs/collection/async-iterable-collection/_shared/async-cross-join-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-cross-join-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-cross-join-iterable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"async-cross-join-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-cross-join-iterable.ts"],"names":[],"mappings":";;;AAGA,kDAAkD;AAKlD,MAAa,sBAAsB;IAInB;IACA;IACA;IAHZ,YACY,UAAoC,EACpC,QAAuC,EACvC,cAEqB;QAJrB,eAAU,GAAV,UAAU,CAA0B;QACpC,aAAQ,GAAR,QAAQ,CAA+B;QACvC,mBAAc,GAAd,cAAc,CAEO;IAC9B,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QAGzB,MAAM,YAAY,GAAG,CACjB,MAAM,IAAI,CAAC,cAAc,CAAC;YACtB,IAAI,CAAC,UAAU;YACf,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC;SACK,CAAC,CAAC,MAAM,CAG/C,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE;YACX,OAAO,MAAM,CAAC;iBACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;gBACP,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;oBACf,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;gBACrB,CAAC,CAAC,CAAC;YACP,CAAC,CAAC;iBACD,MAAM,CACH,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EACrB,IAAI,CAAC,cAAc,CAA4B,EAAE,CAAC,CACrD,CAAC;QACV,CAAC,EACD,IAAI,CAAC,cAAc,CAAC,CAAC,EAA+B,CAAC,CAAC,CACzD,CACJ,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;YAElB,OAAO,WAAW,CAAC,MAAM,CAA4B,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;gBAC1D,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,IAAA,oBAAU,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAEzC,CAAC;YACN,CAAC,EAAE,EAAE,CAAC,CAAC;QACX,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,CAAC,YAEN,CAAC;IACN,CAAC;CACJ;AAhDD,wDAgDC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AsyncErrorHandlerIterable = void 0;
|
|
4
|
+
class AsyncErrorHandlerIterable {
|
|
5
|
+
iterable;
|
|
6
|
+
errorPasser;
|
|
7
|
+
constructor(iterable, errorPasser) {
|
|
8
|
+
this.iterable = iterable;
|
|
9
|
+
this.errorPasser = errorPasser;
|
|
10
|
+
}
|
|
11
|
+
async *[Symbol.asyncIterator]() {
|
|
12
|
+
const iterator = this.iterable[Symbol.asyncIterator]();
|
|
13
|
+
try {
|
|
14
|
+
while (true) {
|
|
15
|
+
const result = await iterator.next();
|
|
16
|
+
if (result.done) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
yield result.value;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
if (this.errorPasser(error)) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
throw error;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.AsyncErrorHandlerIterable = AsyncErrorHandlerIterable;
|
|
31
|
+
//# sourceMappingURL=async-error-handler-iterable.js.map
|
package/dist/cjs/collection/async-iterable-collection/_shared/async-error-handler-iterable.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async-error-handler-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-error-handler-iterable.ts"],"names":[],"mappings":";;;AAAA,MAAa,yBAAyB;IAIb;IACA;IAFrB,YACqB,QAA+B,EAC/B,WAAwC;QADxC,aAAQ,GAAR,QAAQ,CAAuB;QAC/B,gBAAW,GAAX,WAAW,CAA6B;IAC1D,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QACvD,IAAI,CAAC;YAED,OAAO,IAAI,EAAE,CAAC;gBACV,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACrC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;oBACd,OAAO;gBACX,CAAC;gBACD,MAAM,MAAM,CAAC,KAAK,CAAC;YACvB,CAAC;QACL,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACtB,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC1B,OAAO;YACX,CAAC;YACD,MAAM,KAAK,CAAC;QAChB,CAAC;IACL,CAAC;CACJ;AA1BD,8DA0BC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncFilterIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncFilterIterable {
|
|
6
5
|
collection;
|
|
7
6
|
predicateFn;
|
|
@@ -10,19 +9,11 @@ class AsyncFilterIterable {
|
|
|
10
9
|
this.predicateFn = predicateFn;
|
|
11
10
|
}
|
|
12
11
|
async *[Symbol.asyncIterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
yield item;
|
|
17
|
-
}
|
|
12
|
+
for await (const [index, item] of this.collection.entries()) {
|
|
13
|
+
if (await this.predicateFn(item, index, this.collection)) {
|
|
14
|
+
yield item;
|
|
18
15
|
}
|
|
19
16
|
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
if (error instanceof _module_1.CollectionError) {
|
|
22
|
-
throw error;
|
|
23
|
-
}
|
|
24
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
25
|
-
}
|
|
26
17
|
}
|
|
27
18
|
}
|
|
28
19
|
exports.AsyncFilterIterable = AsyncFilterIterable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-filter-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-filter-iterable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"async-filter-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-filter-iterable.ts"],"names":[],"mappings":";;;AAQA,MAAa,mBAAmB;IAIhB;IACA;IAFZ,YACY,UAAoC,EACpC,WAIP;QALO,eAAU,GAAV,UAAU,CAA0B;QACpC,gBAAW,GAAX,WAAW,CAIlB;IACF,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YAC1D,IAAI,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;gBACvD,MAAM,IAAe,CAAC;YAC1B,CAAC;QACL,CAAC;IACL,CAAC;CACJ;AAnBD,kDAmBC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncFlatMapIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncFlatMapIterable {
|
|
6
5
|
collection;
|
|
7
6
|
mapFn;
|
|
@@ -10,16 +9,8 @@ class AsyncFlatMapIterable {
|
|
|
10
9
|
this.mapFn = mapFn;
|
|
11
10
|
}
|
|
12
11
|
async *[Symbol.asyncIterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
yield* await this.mapFn(item, index, this.collection);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
catch (error) {
|
|
19
|
-
if (error instanceof _module_1.CollectionError) {
|
|
20
|
-
throw error;
|
|
21
|
-
}
|
|
22
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
12
|
+
for await (const [index, item] of this.collection.entries()) {
|
|
13
|
+
yield* await this.mapFn(item, index, this.collection);
|
|
23
14
|
}
|
|
24
15
|
}
|
|
25
16
|
}
|
package/dist/cjs/collection/async-iterable-collection/_shared/async-flat-map-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-flat-map-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-flat-map-iterable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"async-flat-map-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-flat-map-iterable.ts"],"names":[],"mappings":";;;AAQA,MAAa,oBAAoB;IAIjB;IACA;IAFZ,YACY,UAAoC,EACpC,KAIP;QALO,eAAU,GAAV,UAAU,CAA0B;QACpC,UAAK,GAAL,KAAK,CAIZ;IACF,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YAC1D,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC1D,CAAC;IACL,CAAC;CACJ;AAjBD,oDAiBC"}
|
package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-after-iterable.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncInsertAfterIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncInsertAfterIterable {
|
|
6
5
|
collection;
|
|
7
6
|
predicateFn;
|
|
@@ -12,23 +11,15 @@ class AsyncInsertAfterIterable {
|
|
|
12
11
|
this.iterable = iterable;
|
|
13
12
|
}
|
|
14
13
|
async *[Symbol.asyncIterator]() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
hasMatched = true;
|
|
23
|
-
}
|
|
24
|
-
index++;
|
|
14
|
+
let hasMatched = false, index = 0;
|
|
15
|
+
for await (const item of this.collection) {
|
|
16
|
+
yield item;
|
|
17
|
+
if (!hasMatched &&
|
|
18
|
+
(await this.predicateFn(item, index, this.collection))) {
|
|
19
|
+
yield* this.iterable;
|
|
20
|
+
hasMatched = true;
|
|
25
21
|
}
|
|
26
|
-
|
|
27
|
-
catch (error) {
|
|
28
|
-
if (error instanceof _module_1.CollectionError) {
|
|
29
|
-
throw error;
|
|
30
|
-
}
|
|
31
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
22
|
+
index++;
|
|
32
23
|
}
|
|
33
24
|
}
|
|
34
25
|
}
|
package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-after-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-insert-after-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-insert-after-iterable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"async-insert-after-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-insert-after-iterable.ts"],"names":[],"mappings":";;;AASA,MAAa,wBAAwB;IAIrB;IACA;IACA;IAHZ,YACY,UAAoC,EACpC,WAA6D,EAC7D,QAAgD;QAFhD,eAAU,GAAV,UAAU,CAA0B;QACpC,gBAAW,GAAX,WAAW,CAAkD;QAC7D,aAAQ,GAAR,QAAQ,CAAwC;IACzD,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,UAAU,GAAG,KAAK,EAClB,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACvC,MAAM,IAAI,CAAC;YACX,IACI,CAAC,UAAU;gBACX,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,EACxD,CAAC;gBACC,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;gBACrB,UAAU,GAAG,IAAI,CAAC;YACtB,CAAC;YACD,KAAK,EAAE,CAAC;QACZ,CAAC;IACL,CAAC;CACJ;AAxBD,4DAwBC"}
|
package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-before-iterable.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncInsertBeforeIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncInsertBeforeIterable {
|
|
6
5
|
collection;
|
|
7
6
|
predicateFn;
|
|
@@ -12,23 +11,15 @@ class AsyncInsertBeforeIterable {
|
|
|
12
11
|
this.iterable = iterable;
|
|
13
12
|
}
|
|
14
13
|
async *[Symbol.asyncIterator]() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
hasMatched = true;
|
|
22
|
-
}
|
|
23
|
-
yield item;
|
|
24
|
-
index++;
|
|
14
|
+
let hasMatched = false, index = 0;
|
|
15
|
+
for await (const item of this.collection) {
|
|
16
|
+
if (!hasMatched &&
|
|
17
|
+
(await this.predicateFn(item, index, this.collection))) {
|
|
18
|
+
yield* this.iterable;
|
|
19
|
+
hasMatched = true;
|
|
25
20
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if (error instanceof _module_1.CollectionError) {
|
|
29
|
-
throw error;
|
|
30
|
-
}
|
|
31
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
21
|
+
yield item;
|
|
22
|
+
index++;
|
|
32
23
|
}
|
|
33
24
|
}
|
|
34
25
|
}
|
package/dist/cjs/collection/async-iterable-collection/_shared/async-insert-before-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-insert-before-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-insert-before-iterable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"async-insert-before-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-insert-before-iterable.ts"],"names":[],"mappings":";;;AASA,MAAa,yBAAyB;IAItB;IACA;IACA;IAHZ,YACY,UAAoC,EACpC,WAA6D,EAC7D,QAAgD;QAFhD,eAAU,GAAV,UAAU,CAA0B;QACpC,gBAAW,GAAX,WAAW,CAAkD;QAC7D,aAAQ,GAAR,QAAQ,CAAwC;IACzD,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,UAAU,GAAG,KAAK,EAClB,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACvC,IACI,CAAC,UAAU;gBACX,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,EACxD,CAAC;gBACC,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;gBACrB,UAAU,GAAG,IAAI,CAAC;YACtB,CAAC;YACD,MAAM,IAAI,CAAC;YACX,KAAK,EAAE,CAAC;QACZ,CAAC;IACL,CAAC;CACJ;AAxBD,8DAwBC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncMapIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncMapIterable {
|
|
6
5
|
collection;
|
|
7
6
|
mapFn;
|
|
@@ -10,16 +9,8 @@ class AsyncMapIterable {
|
|
|
10
9
|
this.mapFn = mapFn;
|
|
11
10
|
}
|
|
12
11
|
async *[Symbol.asyncIterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
yield this.mapFn(item, index, this.collection);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
catch (error) {
|
|
19
|
-
if (error instanceof _module_1.CollectionError) {
|
|
20
|
-
throw error;
|
|
21
|
-
}
|
|
22
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
12
|
+
for await (const [index, item] of this.collection.entries()) {
|
|
13
|
+
yield this.mapFn(item, index, this.collection);
|
|
23
14
|
}
|
|
24
15
|
}
|
|
25
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-map-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-map-iterable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"async-map-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-map-iterable.ts"],"names":[],"mappings":";;;AAQA,MAAa,gBAAgB;IAIb;IACA;IAFZ,YACY,UAAoC,EACpC,KAA0D;QAD1D,eAAU,GAAV,UAAU,CAA0B;QACpC,UAAK,GAAL,KAAK,CAAqD;IACnE,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YAC1D,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACnD,CAAC;IACL,CAAC;CACJ;AAbD,4CAaC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncMergeIterable = void 0;
|
|
4
|
-
const _module_1 = require("../../../contracts/collection/_module");
|
|
5
4
|
class AsyncMergeIterable {
|
|
6
5
|
iterableA;
|
|
7
6
|
iterableB;
|
|
@@ -10,16 +9,8 @@ class AsyncMergeIterable {
|
|
|
10
9
|
this.iterableB = iterableB;
|
|
11
10
|
}
|
|
12
11
|
async *[Symbol.asyncIterator]() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
yield* this.iterableB;
|
|
16
|
-
}
|
|
17
|
-
catch (error) {
|
|
18
|
-
if (error instanceof _module_1.CollectionError) {
|
|
19
|
-
throw error;
|
|
20
|
-
}
|
|
21
|
-
throw new _module_1.UnexpectedCollectionError(`Unexpected error "${String(error)}" occured`, error);
|
|
22
|
-
}
|
|
12
|
+
yield* this.iterableA;
|
|
13
|
+
yield* this.iterableB;
|
|
23
14
|
}
|
|
24
15
|
}
|
|
25
16
|
exports.AsyncMergeIterable = AsyncMergeIterable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-merge-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-merge-iterable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"async-merge-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/async-iterable-collection/_shared/async-merge-iterable.ts"],"names":[],"mappings":";;;AAMA,MAAa,kBAAkB;IAIf;IACA;IAFZ,YACY,SAAqC,EACrC,SAAwC;QADxC,cAAS,GAAT,SAAS,CAA4B;QACrC,cAAS,GAAT,SAAS,CAA+B;IACjD,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;QACtB,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;CACJ;AAZD,gDAYC"}
|