@daiso-tech/core 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_module.js +19 -0
- package/dist/cjs/_module.js.map +1 -0
- package/dist/cjs/collection/_module.js +21 -0
- package/dist/cjs/collection/_module.js.map +1 -0
- package/dist/cjs/collection/_shared.js +28 -0
- package/dist/cjs/collection/_shared.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/_module.js +18 -0
- package/dist/cjs/collection/async-iterable-collection/_module.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-collection.js +669 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-collection.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/_module.js +52 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/_module.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-abort-iterable.js +25 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-abort-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-chunk-iterable.js +43 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-chunk-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-chunk-whilte-iterable.js +43 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-chunk-whilte-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-collapse-iterable.js +32 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-collapse-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-count-by-iterable.js +39 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-count-by-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-cross-join-iterable.js +43 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-cross-join-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-delay-iterable.js +25 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-delay-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-entries-iterable.js +24 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-entries-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-filter-iterable.js +32 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-filter-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-flat-map-iterable.js +30 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-flat-map-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-group-by-iterable.js +30 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-group-by-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-insert-after-iterable.js +43 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-insert-after-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-insert-before-iterable.js +43 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-insert-before-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-map-iterable.js +30 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-map-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-merge-iterable.js +27 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-merge-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-pad-end-iterable.js +34 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-pad-end-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-pad-start-iterable.js +34 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-pad-start-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-partion-iterable.js +45 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-partion-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-repeat-iterable.js +32 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-repeat-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-reverse-iterable.js +28 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-reverse-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-shuffle-iterable.js +25 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-shuffle-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-skip-iterable.js +33 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-skip-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-skip-until-iterable.js +41 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-skip-until-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-slice-iterable.js +36 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-slice-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-sliding-iterable.js +45 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-sliding-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-sort-iterable.js +16 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-sort-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-split-iterable.js +49 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-split-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-take-iterable.js +33 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-take-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-take-until-iterable.js +33 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-take-until-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-tap-iterable.js +27 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-tap-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-timeout-iterable.js +21 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-timeout-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-unique-iterable.js +35 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-unique-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-update-iterable.js +37 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-update-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-when-iterable.js +32 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-when-iterable.js.map +1 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-zip-iterable.js +37 -0
- package/dist/cjs/collection/async-iterable-collection/async-iterable-helpers/async-zip-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/_module.js +18 -0
- package/dist/cjs/collection/iterable-collection/_module.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-collection.js +749 -0
- package/dist/cjs/collection/iterable-collection/iterable-collection.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/_module.js +49 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/_module.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/chunk-iterable.js +43 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/chunk-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/chunk-whilte-iterable.js +43 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/chunk-whilte-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/collapse-iterable.js +32 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/collapse-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/count-by-iterable.js +39 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/count-by-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/cross-join-iterable.js +43 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/cross-join-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/entries-iterable.js +34 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/entries-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/filter-iterable.js +32 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/filter-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/flat-map-iterable.js +30 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/flat-map-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/group-by-iterable.js +40 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/group-by-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/insert-after-iterable.js +37 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/insert-after-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/insert-before-iterable.js +37 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/insert-before-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/map-iterable.js +30 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/map-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/merge-iterable.js +27 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/merge-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/pad-end-iterable.js +44 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/pad-end-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/pad-start-iterable.js +44 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/pad-start-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/partion-iterable.js +40 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/partion-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/repeat-iterable.js +32 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/repeat-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/reverse-iterable.js +38 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/reverse-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/shuffle-iterable.js +35 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/shuffle-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/skip-iterable.js +32 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/skip-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/skip-until-iterable.js +36 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/skip-until-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/slice-iterable.js +46 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/slice-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/sliding-iterable.js +45 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/sliding-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/sort-iterable.js +26 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/sort-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/split-iterable.js +49 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/split-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/take-iterable.js +32 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/take-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/take-until-iterable.js +33 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/take-until-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/tap-iterable.js +27 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/tap-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/unique-iterable.js +35 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/unique-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/update-iterable.js +37 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/update-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/when-iterable.js +32 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/when-iterable.js.map +1 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/zip-iterable.js +33 -0
- package/dist/cjs/collection/iterable-collection/iterable-helpers/zip-iterable.js.map +1 -0
- package/dist/cjs/collection/list-collection/_module.js +18 -0
- package/dist/cjs/collection/list-collection/_module.js.map +1 -0
- package/dist/cjs/collection/list-collection/list-collection.js +1264 -0
- package/dist/cjs/collection/list-collection/list-collection.js.map +1 -0
- package/dist/cjs/contracts/_module.js +18 -0
- package/dist/cjs/contracts/_module.js.map +1 -0
- package/dist/cjs/contracts/collection/_module.js +20 -0
- package/dist/cjs/contracts/collection/_module.js.map +1 -0
- package/dist/cjs/contracts/collection/_shared.js +39 -0
- package/dist/cjs/contracts/collection/_shared.js.map +1 -0
- package/dist/cjs/contracts/collection/async-collection.contract.js +3 -0
- package/dist/cjs/contracts/collection/async-collection.contract.js.map +1 -0
- package/dist/cjs/contracts/collection/collection.contract.js +3 -0
- package/dist/cjs/contracts/collection/collection.contract.js.map +1 -0
- package/dist/cjs/types.js +3 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/esm/_module.js +3 -0
- package/dist/esm/_module.js.map +1 -0
- package/dist/esm/collection/_module.js +5 -0
- package/dist/esm/collection/_module.js.map +1 -0
- package/dist/esm/collection/_shared.js +23 -0
- package/dist/esm/collection/_shared.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/_module.js +2 -0
- package/dist/esm/collection/async-iterable-collection/_module.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-collection.js +665 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-collection.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/_module.js +36 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/_module.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-abort-iterable.js +21 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-abort-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-chunk-iterable.js +39 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-chunk-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-chunk-whilte-iterable.js +39 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-chunk-whilte-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-collapse-iterable.js +28 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-collapse-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-count-by-iterable.js +35 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-count-by-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-cross-join-iterable.js +39 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-cross-join-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-delay-iterable.js +21 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-delay-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-entries-iterable.js +20 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-entries-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-filter-iterable.js +28 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-filter-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-flat-map-iterable.js +26 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-flat-map-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-group-by-iterable.js +26 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-group-by-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-insert-after-iterable.js +39 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-insert-after-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-insert-before-iterable.js +39 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-insert-before-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-map-iterable.js +26 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-map-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-merge-iterable.js +23 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-merge-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-pad-end-iterable.js +30 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-pad-end-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-pad-start-iterable.js +30 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-pad-start-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-partion-iterable.js +41 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-partion-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-repeat-iterable.js +28 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-repeat-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-reverse-iterable.js +24 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-reverse-iterable.js.map +1 -0
- package/{src/collection/async-iterable-collection/async-iterable-helpers/async-shuffle-iterable.ts → dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-shuffle-iterable.js} +7 -9
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-shuffle-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-skip-iterable.js +29 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-skip-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-skip-until-iterable.js +37 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-skip-until-iterable.js.map +1 -0
- package/{src/collection/async-iterable-collection/async-iterable-helpers/async-slice-iterable.ts → dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-slice-iterable.js} +13 -14
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-slice-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-sliding-iterable.js +41 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-sliding-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-sort-iterable.js +12 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-sort-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-split-iterable.js +45 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-split-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-take-iterable.js +29 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-take-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-take-until-iterable.js +29 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-take-until-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-tap-iterable.js +23 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-tap-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-timeout-iterable.js +17 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-timeout-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-unique-iterable.js +31 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-unique-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-update-iterable.js +33 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-update-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-when-iterable.js +28 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-when-iterable.js.map +1 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-zip-iterable.js +33 -0
- package/dist/esm/collection/async-iterable-collection/async-iterable-helpers/async-zip-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/_module.js +2 -0
- package/dist/esm/collection/iterable-collection/_module.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-collection.js +745 -0
- package/dist/esm/collection/iterable-collection/iterable-collection.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/_module.js +33 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/_module.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/chunk-iterable.js +39 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/chunk-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/chunk-whilte-iterable.js +39 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/chunk-whilte-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/collapse-iterable.js +28 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/collapse-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/count-by-iterable.js +35 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/count-by-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/cross-join-iterable.js +39 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/cross-join-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/entries-iterable.js +30 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/entries-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/filter-iterable.js +28 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/filter-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/flat-map-iterable.js +26 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/flat-map-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/group-by-iterable.js +36 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/group-by-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/insert-after-iterable.js +33 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/insert-after-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/insert-before-iterable.js +33 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/insert-before-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/map-iterable.js +26 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/map-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/merge-iterable.js +23 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/merge-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/pad-end-iterable.js +40 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/pad-end-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/pad-start-iterable.js +40 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/pad-start-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/partion-iterable.js +36 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/partion-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/repeat-iterable.js +28 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/repeat-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/reverse-iterable.js +34 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/reverse-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/shuffle-iterable.js +31 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/shuffle-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/skip-iterable.js +28 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/skip-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/skip-until-iterable.js +32 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/skip-until-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/slice-iterable.js +42 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/slice-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/sliding-iterable.js +41 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/sliding-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/sort-iterable.js +22 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/sort-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/split-iterable.js +45 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/split-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/take-iterable.js +28 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/take-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/take-until-iterable.js +29 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/take-until-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/tap-iterable.js +23 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/tap-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/unique-iterable.js +31 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/unique-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/update-iterable.js +33 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/update-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/when-iterable.js +28 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/when-iterable.js.map +1 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/zip-iterable.js +29 -0
- package/dist/esm/collection/iterable-collection/iterable-helpers/zip-iterable.js.map +1 -0
- package/dist/esm/collection/list-collection/_module.js +2 -0
- package/dist/esm/collection/list-collection/_module.js.map +1 -0
- package/dist/esm/collection/list-collection/list-collection.js +1260 -0
- package/dist/esm/collection/list-collection/list-collection.js.map +1 -0
- package/dist/esm/contracts/_module.js +2 -0
- package/dist/esm/contracts/_module.js.map +1 -0
- package/dist/esm/contracts/collection/_module.js +4 -0
- package/dist/esm/contracts/collection/_module.js.map +1 -0
- package/dist/esm/contracts/collection/_shared.js +31 -0
- package/dist/esm/contracts/collection/_shared.js.map +1 -0
- package/dist/esm/contracts/collection/async-collection.contract.js +1 -0
- package/dist/esm/contracts/collection/async-collection.contract.js.map +1 -0
- package/dist/esm/contracts/collection/collection.contract.js +1 -0
- package/dist/esm/contracts/collection/collection.contract.js.map +1 -0
- package/dist/esm/types.js +1 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/types/_module.d.ts +2 -0
- package/dist/types/collection/_module.d.ts +4 -0
- package/dist/types/collection/_shared.d.ts +16 -0
- package/dist/types/collection/async-iterable-collection/_module.d.ts +1 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-collection.d.ts +92 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/_module.d.ts +35 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-abort-iterable.d.ts +10 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-chunk-iterable.d.ts +11 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-chunk-whilte-iterable.d.ts +12 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-collapse-iterable.d.ts +9 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-count-by-iterable.d.ts +11 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-cross-join-iterable.d.ts +11 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-delay-iterable.d.ts +10 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-entries-iterable.d.ts +11 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-filter-iterable.d.ts +11 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-flat-map-iterable.d.ts +11 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-group-by-iterable.d.ts +12 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-insert-after-iterable.d.ts +12 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-insert-before-iterable.d.ts +12 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-map-iterable.d.ts +11 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-merge-iterable.d.ts +10 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-pad-end-iterable.d.ts +12 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-pad-start-iterable.d.ts +12 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-partion-iterable.d.ts +12 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-repeat-iterable.d.ts +11 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-reverse-iterable.d.ts +12 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-shuffle-iterable.d.ts +9 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-skip-iterable.d.ts +11 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-skip-until-iterable.d.ts +11 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-slice-iterable.d.ts +12 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-sliding-iterable.d.ts +12 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-sort-iterable.d.ts +10 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-split-iterable.d.ts +12 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-take-iterable.d.ts +11 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-take-until-iterable.d.ts +11 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-tap-iterable.d.ts +10 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-timeout-iterable.d.ts +10 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-unique-iterable.d.ts +11 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-update-iterable.d.ts +12 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-when-iterable.d.ts +11 -0
- package/dist/types/collection/async-iterable-collection/async-iterable-helpers/async-zip-iterable.d.ts +10 -0
- package/dist/types/collection/iterable-collection/_module.d.ts +1 -0
- package/dist/types/collection/iterable-collection/iterable-collection.d.ts +89 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/_module.d.ts +32 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/chunk-iterable.d.ts +8 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/chunk-whilte-iterable.d.ts +9 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/collapse-iterable.d.ts +6 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/count-by-iterable.d.ts +8 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/cross-join-iterable.d.ts +8 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/entries-iterable.d.ts +7 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/filter-iterable.d.ts +8 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/flat-map-iterable.d.ts +8 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/group-by-iterable.d.ts +9 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/insert-after-iterable.d.ts +9 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/insert-before-iterable.d.ts +9 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/map-iterable.d.ts +8 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/merge-iterable.d.ts +6 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/pad-end-iterable.d.ts +9 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/pad-start-iterable.d.ts +9 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/partion-iterable.d.ts +9 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/repeat-iterable.d.ts +8 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/reverse-iterable.d.ts +9 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/shuffle-iterable.d.ts +5 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/skip-iterable.d.ts +8 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/skip-until-iterable.d.ts +8 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/slice-iterable.d.ts +9 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/sliding-iterable.d.ts +9 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/sort-iterable.d.ts +7 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/split-iterable.d.ts +9 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/take-iterable.d.ts +8 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/take-until-iterable.d.ts +8 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/tap-iterable.d.ts +7 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/unique-iterable.d.ts +8 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/update-iterable.d.ts +9 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/when-iterable.d.ts +8 -0
- package/dist/types/collection/iterable-collection/iterable-helpers/zip-iterable.d.ts +7 -0
- package/dist/types/collection/list-collection/_module.d.ts +1 -0
- package/dist/types/collection/list-collection/list-collection.d.ts +86 -0
- package/dist/types/contracts/_module.d.ts +1 -0
- package/dist/types/contracts/collection/_module.d.ts +3 -0
- package/{src/contracts/collection/_shared.ts → dist/types/contracts/collection/_shared.d.ts} +31 -118
- package/{src/contracts/collection/async-collection.contract.ts → dist/types/contracts/collection/async-collection.contract.d.ts} +84 -356
- package/{src/contracts/collection/collection.contract.ts → dist/types/contracts/collection/collection.contract.d.ts} +54 -311
- package/dist/types/types.d.ts +1 -0
- package/package.json +5 -2
- package/.changeset/README.md +0 -8
- package/.changeset/config.json +0 -11
- package/.eslintignore +0 -3
- package/.eslintrc.json +0 -50
- package/.gitattributes +0 -6
- package/.github/workflows/main.yaml +0 -54
- package/.github/workflows/release.yaml +0 -31
- package/.prettierignore +0 -4
- package/.prettierrc.json +0 -4
- package/.vscode/settings.json +0 -46
- package/CHANGELOG.md +0 -7
- package/docs-api/.nojekyll +0 -1
- package/docs-api/assets/highlight.css +0 -92
- package/docs-api/assets/icons.js +0 -18
- package/docs-api/assets/icons.svg +0 -1
- package/docs-api/assets/main.js +0 -60
- package/docs-api/assets/navigation.js +0 -1
- package/docs-api/assets/search.js +0 -1
- package/docs-api/assets/style.css +0 -1448
- package/docs-api/classes/AsyncIterableCollection.html +0 -437
- package/docs-api/classes/CollectionError.html +0 -12
- package/docs-api/classes/IndexOverflowError.html +0 -12
- package/docs-api/classes/ItemNotFoundError.html +0 -12
- package/docs-api/classes/IterableCollection.html +0 -434
- package/docs-api/classes/ListCollection.html +0 -434
- package/docs-api/classes/MultipleItemsFoundError.html +0 -12
- package/docs-api/classes/UnexpectedCollectionError.html +0 -12
- package/docs-api/functions/isAsyncIterable.html +0 -1
- package/docs-api/functions/isIterable.html +0 -1
- package/docs-api/functions/range.html +0 -4
- package/docs-api/hierarchy.html +0 -1
- package/docs-api/index.html +0 -1
- package/docs-api/modules.html +0 -60
- package/docs-api/types/AsyncCollapse.html +0 -1
- package/docs-api/types/AsyncFilter.html +0 -1
- package/docs-api/types/AsyncFilter_.html +0 -1
- package/docs-api/types/AsyncFindOrSettings.html +0 -1
- package/docs-api/types/AsyncFindSettings.html +0 -1
- package/docs-api/types/AsyncForEach.html +0 -1
- package/docs-api/types/AsyncForEach_.html +0 -1
- package/docs-api/types/AsyncGroupBySettings.html +0 -1
- package/docs-api/types/AsyncIterableValue.html +0 -1
- package/docs-api/types/AsyncLazyable.html +0 -1
- package/docs-api/types/AsyncLazyable_.html +0 -1
- package/docs-api/types/AsyncMap.html +0 -1
- package/docs-api/types/AsyncMap_.html +0 -1
- package/docs-api/types/AsyncModifier.html +0 -1
- package/docs-api/types/AsyncModifier_.html +0 -1
- package/docs-api/types/AsyncReduce.html +0 -1
- package/docs-api/types/AsyncReduceSettings.html +0 -1
- package/docs-api/types/AsyncReduce_.html +0 -1
- package/docs-api/types/AsyncTap.html +0 -1
- package/docs-api/types/AsyncTap_.html +0 -1
- package/docs-api/types/AsyncTransform.html +0 -1
- package/docs-api/types/AsyncTransform_.html +0 -1
- package/docs-api/types/Collapse.html +0 -1
- package/docs-api/types/Comparator.html +0 -1
- package/docs-api/types/EnsureType.html +0 -1
- package/docs-api/types/Filter.html +0 -1
- package/docs-api/types/FilterGuard.html +0 -1
- package/docs-api/types/Filter_.html +0 -1
- package/docs-api/types/FindOrSettings.html +0 -1
- package/docs-api/types/FindSettings.html +0 -1
- package/docs-api/types/ForEach.html +0 -1
- package/docs-api/types/GroupBySettings.html +0 -1
- package/docs-api/types/IAsyncCollection.html +0 -357
- package/docs-api/types/ICollection.html +0 -357
- package/docs-api/types/JoinSettings.html +0 -1
- package/docs-api/types/Lazyable.html +0 -1
- package/docs-api/types/Map.html +0 -1
- package/docs-api/types/Modifier.html +0 -1
- package/docs-api/types/PageSettings.html +0 -1
- package/docs-api/types/RecordItem.html +0 -1
- package/docs-api/types/Reduce.html +0 -1
- package/docs-api/types/ReduceSettings.html +0 -1
- package/docs-api/types/ReverseSettings.html +0 -1
- package/docs-api/types/SliceSettings.html +0 -1
- package/docs-api/types/SlidingSettings.html +0 -1
- package/docs-api/types/Tap.html +0 -1
- package/docs-api/types/Transform.html +0 -1
- package/docs-api/types/UpdatedItem.html +0 -1
- package/src/_module.ts +0 -2
- package/src/collection/_module.ts +0 -4
- package/src/collection/_shared.ts +0 -45
- package/src/collection/async-iterable-collection/_module.ts +0 -1
- package/src/collection/async-iterable-collection/async-iterable-collection.test.ts +0 -3195
- package/src/collection/async-iterable-collection/async-iterable-collection.ts +0 -1276
- package/src/collection/async-iterable-collection/async-iterable-helpers/_module.ts +0 -35
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-abort-iterable.ts +0 -25
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-chunk-iterable.ts +0 -57
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-chunk-whilte-iterable.ts +0 -54
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-collapse-iterable.ts +0 -40
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-count-by-iterable.ts +0 -58
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-cross-join-iterable.ts +0 -69
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-delay-iterable.ts +0 -19
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-entries-iterable.ts +0 -28
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-filter-iterable.ts +0 -42
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-flat-map-iterable.ts +0 -44
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-group-by-iterable.ts +0 -48
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-insert-after-iterable.ts +0 -57
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-insert-before-iterable.ts +0 -57
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-map-iterable.ts +0 -40
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-merge-iterable.ts +0 -35
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-pad-end-iterable.ts +0 -41
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-pad-start-iterable.ts +0 -41
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-partion-iterable.ts +0 -63
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-repeat-iterable.ts +0 -40
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-reverse-iterable.ts +0 -35
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-skip-iterable.ts +0 -41
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-skip-until-iterable.ts +0 -55
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-sliding-iterable.ts +0 -54
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-sort-iterable.ts +0 -18
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-split-iterable.ts +0 -64
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-take-iterable.ts +0 -41
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-take-until-iterable.ts +0 -41
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-tap-iterable.ts +0 -34
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-timeout-iterable.ts +0 -20
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-unique-iterable.ts +0 -49
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-update-iterable.ts +0 -64
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-when-iterable.ts +0 -43
- package/src/collection/async-iterable-collection/async-iterable-helpers/async-zip-iterable.ts +0 -45
- package/src/collection/iterable-collection/_module.ts +0 -1
- package/src/collection/iterable-collection/iterable-collection.test.ts +0 -2379
- package/src/collection/iterable-collection/iterable-collection.ts +0 -1317
- package/src/collection/iterable-collection/iterable-helpers/_module.ts +0 -32
- package/src/collection/iterable-collection/iterable-helpers/chunk-iterable.ts +0 -49
- package/src/collection/iterable-collection/iterable-helpers/chunk-whilte-iterable.ts +0 -51
- package/src/collection/iterable-collection/iterable-helpers/collapse-iterable.ts +0 -35
- package/src/collection/iterable-collection/iterable-helpers/count-by-iterable.ts +0 -49
- package/src/collection/iterable-collection/iterable-helpers/cross-join-iterable.ts +0 -57
- package/src/collection/iterable-collection/iterable-helpers/entries-iterable.ts +0 -42
- package/src/collection/iterable-collection/iterable-helpers/filter-iterable.ts +0 -39
- package/src/collection/iterable-collection/iterable-helpers/flat-map-iterable.ts +0 -35
- package/src/collection/iterable-collection/iterable-helpers/group-by-iterable.ts +0 -52
- package/src/collection/iterable-collection/iterable-helpers/insert-after-iterable.ts +0 -43
- package/src/collection/iterable-collection/iterable-helpers/insert-before-iterable.ts +0 -43
- package/src/collection/iterable-collection/iterable-helpers/map-iterable.ts +0 -35
- package/src/collection/iterable-collection/iterable-helpers/merge-iterable.ts +0 -31
- package/src/collection/iterable-collection/iterable-helpers/pad-end-iterable.ts +0 -52
- package/src/collection/iterable-collection/iterable-helpers/pad-start-iterable.ts +0 -52
- package/src/collection/iterable-collection/iterable-helpers/partion-iterable.ts +0 -46
- package/src/collection/iterable-collection/iterable-helpers/repeat-iterable.ts +0 -36
- package/src/collection/iterable-collection/iterable-helpers/reverse-iterable.ts +0 -46
- package/src/collection/iterable-collection/iterable-helpers/shuffle-iterable.ts +0 -36
- package/src/collection/iterable-collection/iterable-helpers/skip-iterable.ts +0 -37
- package/src/collection/iterable-collection/iterable-helpers/skip-until-iterable.ts +0 -41
- package/src/collection/iterable-collection/iterable-helpers/slice-iterable.ts +0 -47
- package/src/collection/iterable-collection/iterable-helpers/sliding-iterable.ts +0 -49
- package/src/collection/iterable-collection/iterable-helpers/sort-iterable.ts +0 -29
- package/src/collection/iterable-collection/iterable-helpers/split-iterable.ts +0 -58
- package/src/collection/iterable-collection/iterable-helpers/take-iterable.ts +0 -37
- package/src/collection/iterable-collection/iterable-helpers/take-until-iterable.ts +0 -38
- package/src/collection/iterable-collection/iterable-helpers/tap-iterable.ts +0 -31
- package/src/collection/iterable-collection/iterable-helpers/unique-iterable.ts +0 -43
- package/src/collection/iterable-collection/iterable-helpers/update-iterable.ts +0 -50
- package/src/collection/iterable-collection/iterable-helpers/when-iterable.ts +0 -37
- package/src/collection/iterable-collection/iterable-helpers/zip-iterable.ts +0 -41
- package/src/collection/list-collection/_module.ts +0 -1
- package/src/collection/list-collection/list-collection.test.ts +0 -2280
- package/src/collection/list-collection/list-collection.ts +0 -1883
- package/src/contracts/_module.ts +0 -1
- package/src/contracts/collection/_module.ts +0 -3
- package/src/types.ts +0 -2
- package/tsconfig.base.json +0 -31
- package/tsconfig.cjs.json +0 -12
- package/tsconfig.esm.json +0 -12
- package/tsconfig.json +0 -10
- package/tsconfig.types.json +0 -12
- package/vite.config.ts +0 -6
|
@@ -1,46 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
type SlidingSettings,
|
|
4
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5
|
-
type CollectionError,
|
|
6
|
-
type Comparator,
|
|
7
|
-
type Filter,
|
|
8
|
-
type FindOrSettings,
|
|
9
|
-
type FindSettings,
|
|
10
|
-
type ForEach,
|
|
11
|
-
type GroupBySettings,
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13
|
-
type ItemNotFoundError,
|
|
14
|
-
type JoinSettings,
|
|
15
|
-
type Lazyable,
|
|
16
|
-
type Map,
|
|
17
|
-
type Modifier,
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
19
|
-
type MultipleItemsFoundError,
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
21
|
-
type IndexOverflowError,
|
|
22
|
-
type PageSettings,
|
|
23
|
-
type RecordItem,
|
|
24
|
-
type ReduceSettings,
|
|
25
|
-
type ReverseSettings,
|
|
26
|
-
type Tap,
|
|
27
|
-
type Transform,
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
29
|
-
type UnexpectedCollectionError,
|
|
30
|
-
type UpdatedItem,
|
|
31
|
-
} from "@/contracts/collection/_shared";
|
|
32
|
-
import { type EnsureType } from "@/types";
|
|
33
|
-
|
|
1
|
+
import { type SliceSettings, type SlidingSettings, type Comparator, type Filter, type FindOrSettings, type FindSettings, type ForEach, type GroupBySettings, type JoinSettings, type Lazyable, type Map, type Modifier, type PageSettings, type RecordItem, type ReduceSettings, type ReverseSettings, type Tap, type Transform, type UpdatedItem } from "../../contracts/collection/_shared";
|
|
2
|
+
import { type EnsureType } from "../../types";
|
|
34
3
|
/**
|
|
35
4
|
* @group Collections
|
|
36
5
|
*/
|
|
37
|
-
export type Collapse<TValue> = TValue extends
|
|
38
|
-
| Array<infer TItem>
|
|
39
|
-
| Iterable<infer TItem>
|
|
40
|
-
| ICollection<infer TItem>
|
|
41
|
-
? TItem
|
|
42
|
-
: TValue;
|
|
43
|
-
|
|
6
|
+
export type Collapse<TValue> = TValue extends Array<infer TItem> | Iterable<infer TItem> | ICollection<infer TItem> ? TItem : TValue;
|
|
44
7
|
/**
|
|
45
8
|
* ICollection is immutable and all the methods return new copies
|
|
46
9
|
* @throws {CollectionError}
|
|
@@ -53,15 +16,9 @@ export type Collapse<TValue> = TValue extends
|
|
|
53
16
|
*/
|
|
54
17
|
export type ICollection<TInput> = Iterable<TInput> & {
|
|
55
18
|
iterator(): Iterator<TInput, void>;
|
|
56
|
-
|
|
57
|
-
entries(
|
|
58
|
-
throwOnNumberLimit?: boolean,
|
|
59
|
-
): ICollection<RecordItem<number, TInput>>;
|
|
60
|
-
|
|
19
|
+
entries(throwOnNumberLimit?: boolean): ICollection<RecordItem<number, TInput>>;
|
|
61
20
|
keys(throwOnNumberLimit?: boolean): ICollection<number>;
|
|
62
|
-
|
|
63
21
|
values(): ICollection<TInput>;
|
|
64
|
-
|
|
65
22
|
/**
|
|
66
23
|
* The filter method filters the collection using the given callback, keeping only those items that pass a given truth test:
|
|
67
24
|
* @example
|
|
@@ -70,11 +27,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
70
27
|
* filtered.toArray();
|
|
71
28
|
* // [3, 4]
|
|
72
29
|
*/
|
|
73
|
-
filter<TOutput extends TInput>(
|
|
74
|
-
filter: Filter<TInput, ICollection<TInput>, TOutput>,
|
|
75
|
-
throwOnNumberLimit?: boolean,
|
|
76
|
-
): ICollection<TOutput>;
|
|
77
|
-
|
|
30
|
+
filter<TOutput extends TInput>(filter: Filter<TInput, ICollection<TInput>, TOutput>, throwOnNumberLimit?: boolean): ICollection<TOutput>;
|
|
78
31
|
/**
|
|
79
32
|
* The map method iterates through the collection and passes each value to the given callback.
|
|
80
33
|
* The mapFunction is free to modify the item and return it, thus forming a new collection of modified items:
|
|
@@ -84,20 +37,12 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
84
37
|
* mapped.toArray();
|
|
85
38
|
* // [2, 4, 6, 8, 10]
|
|
86
39
|
*/
|
|
87
|
-
map<TOutput>(
|
|
88
|
-
|
|
89
|
-
throwOnNumberLimit?: boolean,
|
|
90
|
-
): ICollection<TOutput>;
|
|
91
|
-
|
|
92
|
-
reduce<TOutput = TInput>(
|
|
93
|
-
settings: ReduceSettings<TInput, ICollection<TInput>, TOutput>,
|
|
94
|
-
): TOutput;
|
|
95
|
-
|
|
40
|
+
map<TOutput>(map: Map<TInput, ICollection<TInput>, TOutput>, throwOnNumberLimit?: boolean): ICollection<TOutput>;
|
|
41
|
+
reduce<TOutput = TInput>(settings: ReduceSettings<TInput, ICollection<TInput>, TOutput>): TOutput;
|
|
96
42
|
/**
|
|
97
43
|
* @throws {TypeError}
|
|
98
44
|
*/
|
|
99
45
|
join(settings?: JoinSettings): string;
|
|
100
|
-
|
|
101
46
|
/**
|
|
102
47
|
* The collapse method collapses a collection of arrays into a single, flat collection:
|
|
103
48
|
* @example
|
|
@@ -107,7 +52,6 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
107
52
|
* // [1, 2, 3, 4]
|
|
108
53
|
*/
|
|
109
54
|
collapse(): ICollection<Collapse<TInput>>;
|
|
110
|
-
|
|
111
55
|
/**
|
|
112
56
|
* The flatMap method returns a new array formed by applying a given callback function to each element of the array, and then collapses the result by one level.
|
|
113
57
|
* It is identical to a map() followed by a collapse()
|
|
@@ -116,11 +60,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
116
60
|
* collection.toArray();
|
|
117
61
|
* // [2, "a", "b", 2, "c", "d"]
|
|
118
62
|
*/
|
|
119
|
-
flatMap<TOutput>(
|
|
120
|
-
map: Map<TInput, ICollection<TInput>, Iterable<TOutput>>,
|
|
121
|
-
throwOnNumberLimit?: boolean,
|
|
122
|
-
): ICollection<TOutput>;
|
|
123
|
-
|
|
63
|
+
flatMap<TOutput>(map: Map<TInput, ICollection<TInput>, Iterable<TOutput>>, throwOnNumberLimit?: boolean): ICollection<TOutput>;
|
|
124
64
|
/**
|
|
125
65
|
* The update method filters the collection using the given callback, keeping only those items that pass a given truth test and thereafter updates the filtered items:
|
|
126
66
|
* @example
|
|
@@ -129,12 +69,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
129
69
|
* updateCollection.toArray();
|
|
130
70
|
* // [1, 4, 3, 8, 5]
|
|
131
71
|
*/
|
|
132
|
-
update<TFilterOutput extends TInput, TMapOutput>(
|
|
133
|
-
filter: Filter<TInput, ICollection<TInput>, TFilterOutput>,
|
|
134
|
-
map: Map<TFilterOutput, ICollection<TInput>, TMapOutput>,
|
|
135
|
-
throwOnNumberLimit?: boolean,
|
|
136
|
-
): ICollection<UpdatedItem<TInput, TFilterOutput, TMapOutput>>;
|
|
137
|
-
|
|
72
|
+
update<TFilterOutput extends TInput, TMapOutput>(filter: Filter<TInput, ICollection<TInput>, TFilterOutput>, map: Map<TFilterOutput, ICollection<TInput>, TMapOutput>, throwOnNumberLimit?: boolean): ICollection<UpdatedItem<TInput, TFilterOutput, TMapOutput>>;
|
|
138
73
|
/**
|
|
139
74
|
* The page method returns a new collection containing the items that would be present on a given page number.
|
|
140
75
|
* The method accepts the page number as its first argument and the number of items to show per page as its second argument:
|
|
@@ -148,7 +83,6 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
148
83
|
* // [4, 5, 6]
|
|
149
84
|
*/
|
|
150
85
|
page(settings: PageSettings): ICollection<TInput>;
|
|
151
|
-
|
|
152
86
|
/**
|
|
153
87
|
* The sum method returns the sum of all items in the collection. If the collection contains nested arrays or objects,
|
|
154
88
|
* you should pass a map function that returns a number to be used in sum calculation.
|
|
@@ -159,11 +93,9 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
159
93
|
* // 6
|
|
160
94
|
* @throws {CollectionError} {@link CollectionError}
|
|
161
95
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
162
|
-
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
163
96
|
* @throws {TypeError} {@link TypeError}
|
|
164
97
|
*/
|
|
165
|
-
sum(
|
|
166
|
-
|
|
98
|
+
sum(): EnsureType<TInput, number>;
|
|
167
99
|
/**
|
|
168
100
|
* The average method returns the average of all items in the collection. If the collection contains nested arrays or objects,
|
|
169
101
|
* you should pass a map function that returns a number to be used in average calculation.
|
|
@@ -174,11 +106,9 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
174
106
|
* // 2
|
|
175
107
|
* @throws {CollectionError} {@link CollectionError}
|
|
176
108
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
177
|
-
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
178
109
|
* @throws {TypeError} {@link TypeError}
|
|
179
110
|
*/
|
|
180
|
-
average(
|
|
181
|
-
|
|
111
|
+
average(): EnsureType<TInput, number>;
|
|
182
112
|
/**
|
|
183
113
|
* The median method returns the median of all items in the collection. If the collection contains nested arrays or objects,
|
|
184
114
|
* you should pass a map function that returns a number to be used in median calculation.
|
|
@@ -193,7 +123,6 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
193
123
|
* @throws {TypeError} {@link TypeError}
|
|
194
124
|
*/
|
|
195
125
|
median(throwOnNumberLimit?: boolean): EnsureType<TInput, number>;
|
|
196
|
-
|
|
197
126
|
/**
|
|
198
127
|
* The min method returns the min of all items in the collection. If the collection contains nested arrays or objects,
|
|
199
128
|
* you should pass a map function that returns a number to be used in min calculation.
|
|
@@ -207,7 +136,6 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
207
136
|
* @throws {TypeError} {@link TypeError}
|
|
208
137
|
*/
|
|
209
138
|
min(): EnsureType<TInput, number>;
|
|
210
|
-
|
|
211
139
|
/**
|
|
212
140
|
* The max method returns the max of all items in the collection. If the collection contains nested arrays or objects,
|
|
213
141
|
* you should pass a map function that returns a number to be used in max calculation.
|
|
@@ -221,7 +149,6 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
221
149
|
* @throws {TypeError} {@link TypeError}
|
|
222
150
|
*/
|
|
223
151
|
max(): EnsureType<TInput, number>;
|
|
224
|
-
|
|
225
152
|
/**
|
|
226
153
|
* The percentage method may be used to quickly determine the percentage of items in the collection that pass a given truth test
|
|
227
154
|
* @example
|
|
@@ -232,11 +159,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
232
159
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
233
160
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
234
161
|
*/
|
|
235
|
-
percentage(
|
|
236
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
237
|
-
throwOnNumberLimit?: boolean,
|
|
238
|
-
): number;
|
|
239
|
-
|
|
162
|
+
percentage(filter: Filter<TInput, ICollection<TInput>>, throwOnNumberLimit?: boolean): number;
|
|
240
163
|
/**
|
|
241
164
|
* The some method determines whether the collection has a given item.
|
|
242
165
|
* You must pass a closure to the some method to determine if an element exists in the collection matching a given truth test:
|
|
@@ -248,11 +171,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
248
171
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
249
172
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
250
173
|
*/
|
|
251
|
-
some<TOutput extends TInput>(
|
|
252
|
-
filter: Filter<TInput, ICollection<TInput>, TOutput>,
|
|
253
|
-
throwOnNumberLimit?: boolean,
|
|
254
|
-
): boolean;
|
|
255
|
-
|
|
174
|
+
some<TOutput extends TInput>(filter: Filter<TInput, ICollection<TInput>, TOutput>, throwOnNumberLimit?: boolean): boolean;
|
|
256
175
|
/**
|
|
257
176
|
* The every method may be used to verify that all elements of a collection pass a given truth test:
|
|
258
177
|
* @example
|
|
@@ -263,11 +182,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
263
182
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
264
183
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
265
184
|
*/
|
|
266
|
-
every<TOutput extends TInput>(
|
|
267
|
-
filter: Filter<TInput, ICollection<TInput>, TOutput>,
|
|
268
|
-
throwOnNumberLimit?: boolean,
|
|
269
|
-
): boolean;
|
|
270
|
-
|
|
185
|
+
every<TOutput extends TInput>(filter: Filter<TInput, ICollection<TInput>, TOutput>, throwOnNumberLimit?: boolean): boolean;
|
|
271
186
|
/**
|
|
272
187
|
* The take method returns items in the collection until the given callback returns true:
|
|
273
188
|
* @example
|
|
@@ -282,7 +197,6 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
282
197
|
* // [4, 5]
|
|
283
198
|
*/
|
|
284
199
|
take(limit: number, throwOnNumberLimit?: boolean): ICollection<TInput>;
|
|
285
|
-
|
|
286
200
|
/**
|
|
287
201
|
* The takeUntil method returns items in the collection until the given callback returns true:
|
|
288
202
|
* @example
|
|
@@ -291,11 +205,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
291
205
|
* chunk.toArray();
|
|
292
206
|
* // [1, 2]
|
|
293
207
|
*/
|
|
294
|
-
takeUntil(
|
|
295
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
296
|
-
throwOnNumberLimit?: boolean,
|
|
297
|
-
): ICollection<TInput>;
|
|
298
|
-
|
|
208
|
+
takeUntil(filter: Filter<TInput, ICollection<TInput>>, throwOnNumberLimit?: boolean): ICollection<TInput>;
|
|
299
209
|
/**
|
|
300
210
|
* The takeWhile method returns items in the collection until the given callback returns false:
|
|
301
211
|
* @example
|
|
@@ -304,11 +214,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
304
214
|
* chunk.toArray();
|
|
305
215
|
* // [1, 2]
|
|
306
216
|
*/
|
|
307
|
-
takeWhile(
|
|
308
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
309
|
-
throwOnNumberLimit?: boolean,
|
|
310
|
-
): ICollection<TInput>;
|
|
311
|
-
|
|
217
|
+
takeWhile(filter: Filter<TInput, ICollection<TInput>>, throwOnNumberLimit?: boolean): ICollection<TInput>;
|
|
312
218
|
/**
|
|
313
219
|
* The skip method returns a new collection, with the given number of elements removed from the beginning of the collection:
|
|
314
220
|
* @example
|
|
@@ -317,7 +223,6 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
317
223
|
* // [5, 6, 7, 8, 9, 10]
|
|
318
224
|
*/
|
|
319
225
|
skip(offset: number, throwOnNumberLimit?: boolean): ICollection<TInput>;
|
|
320
|
-
|
|
321
226
|
/**
|
|
322
227
|
* The skipUntil method skips over items from the collection until the given callback returns true
|
|
323
228
|
* and then returns the remaining items in the collection as a new collection instance:
|
|
@@ -326,11 +231,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
326
231
|
* collection.toArray();
|
|
327
232
|
* // [3, 4]
|
|
328
233
|
*/
|
|
329
|
-
skipUntil(
|
|
330
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
331
|
-
throwOnNumberLimit?: boolean,
|
|
332
|
-
): ICollection<TInput>;
|
|
333
|
-
|
|
234
|
+
skipUntil(filter: Filter<TInput, ICollection<TInput>>, throwOnNumberLimit?: boolean): ICollection<TInput>;
|
|
334
235
|
/**
|
|
335
236
|
* The skipWhile method skips over items from the collection while the given callback returns false and then returns the remaining items in the collection as a new collection:
|
|
336
237
|
* @example
|
|
@@ -338,11 +239,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
338
239
|
* collection.toArray();
|
|
339
240
|
* // [4]
|
|
340
241
|
*/
|
|
341
|
-
skipWhile(
|
|
342
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
343
|
-
throwOnNumberLimit?: boolean,
|
|
344
|
-
): ICollection<TInput>;
|
|
345
|
-
|
|
242
|
+
skipWhile(filter: Filter<TInput, ICollection<TInput>>, throwOnNumberLimit?: boolean): ICollection<TInput>;
|
|
346
243
|
/**
|
|
347
244
|
* The when method will execute the given callback when the first argument given to the method evaluates to true:
|
|
348
245
|
* @example
|
|
@@ -352,11 +249,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
352
249
|
* collection.toArray();
|
|
353
250
|
* // [1, 2, 3, 4, -3]
|
|
354
251
|
*/
|
|
355
|
-
when<TExtended = TInput>(
|
|
356
|
-
condition: boolean,
|
|
357
|
-
callback: Modifier<ICollection<TInput>, ICollection<TExtended>>,
|
|
358
|
-
): ICollection<TInput | TExtended>;
|
|
359
|
-
|
|
252
|
+
when<TExtended = TInput>(condition: boolean, callback: Modifier<ICollection<TInput>, ICollection<TExtended>>): ICollection<TInput | TExtended>;
|
|
360
253
|
/**
|
|
361
254
|
* The whenEmpty method will execute the given callback when the collection is empty:
|
|
362
255
|
* @example
|
|
@@ -370,10 +263,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
370
263
|
* collection.toArray();
|
|
371
264
|
* // [1]
|
|
372
265
|
*/
|
|
373
|
-
whenEmpty<TExtended = TInput>(
|
|
374
|
-
callback: Modifier<ICollection<TInput>, ICollection<TExtended>>,
|
|
375
|
-
): ICollection<TInput | TExtended>;
|
|
376
|
-
|
|
266
|
+
whenEmpty<TExtended = TInput>(callback: Modifier<ICollection<TInput>, ICollection<TExtended>>): ICollection<TInput | TExtended>;
|
|
377
267
|
/**
|
|
378
268
|
* The whenNot method will execute the given callback when the first argument given to the method evaluates to false:
|
|
379
269
|
* @example
|
|
@@ -383,11 +273,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
383
273
|
* collection.toArray();
|
|
384
274
|
* // [1, 2, 3, 4, 20]
|
|
385
275
|
*/
|
|
386
|
-
whenNot<TExtended = TInput>(
|
|
387
|
-
condition: boolean,
|
|
388
|
-
callback: Modifier<ICollection<TInput>, ICollection<TExtended>>,
|
|
389
|
-
): ICollection<TInput | TExtended>;
|
|
390
|
-
|
|
276
|
+
whenNot<TExtended = TInput>(condition: boolean, callback: Modifier<ICollection<TInput>, ICollection<TExtended>>): ICollection<TInput | TExtended>;
|
|
391
277
|
/**
|
|
392
278
|
* The whenNotEmpty method will execute the given callback when the collection is empty:
|
|
393
279
|
* @example
|
|
@@ -401,10 +287,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
401
287
|
* collection.toArray();
|
|
402
288
|
* // [1, -3]
|
|
403
289
|
*/
|
|
404
|
-
whenNotEmpty<TExtended = TInput>(
|
|
405
|
-
callback: Modifier<ICollection<TInput>, ICollection<TExtended>>,
|
|
406
|
-
): ICollection<TInput | TExtended>;
|
|
407
|
-
|
|
290
|
+
whenNotEmpty<TExtended = TInput>(callback: Modifier<ICollection<TInput>, ICollection<TExtended>>): ICollection<TInput | TExtended>;
|
|
408
291
|
/**
|
|
409
292
|
* The pipe method passes the collection to the given closure and returns the result of the executed closure:
|
|
410
293
|
* @example
|
|
@@ -412,10 +295,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
412
295
|
* const piped = collection.pipe(collection => collection.sum());
|
|
413
296
|
* // 6
|
|
414
297
|
*/
|
|
415
|
-
pipe<TOutput = TInput>(
|
|
416
|
-
callback: Transform<ICollection<TInput>, TOutput>,
|
|
417
|
-
): TOutput;
|
|
418
|
-
|
|
298
|
+
pipe<TOutput = TInput>(callback: Transform<ICollection<TInput>, TOutput>): TOutput;
|
|
419
299
|
/**
|
|
420
300
|
* The tap method passes the collection to the given callback, allowing you to "tap" into the collection at a specific point
|
|
421
301
|
* and do something with the items while not affecting the collection itself.The collection is then returned by the tap method:
|
|
@@ -430,7 +310,6 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
430
310
|
* // [1, 2, 3, 4, 5, 6]
|
|
431
311
|
*/
|
|
432
312
|
tap(callback: Tap<ICollection<TInput>>): ICollection<TInput>;
|
|
433
|
-
|
|
434
313
|
/**
|
|
435
314
|
* The chunk method breaks the collection into multiple, smaller collections of a given size:
|
|
436
315
|
* @example
|
|
@@ -440,7 +319,6 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
440
319
|
* // [[1, 2, 3, 4], [5, 6, 7]]
|
|
441
320
|
*/
|
|
442
321
|
chunk(chunkSize: number): ICollection<ICollection<TInput>>;
|
|
443
|
-
|
|
444
322
|
/**
|
|
445
323
|
* The chunkWhile method breaks the collection into multiple, smaller collections based on the evaluation of the given callback.
|
|
446
324
|
* The chunk variable passed to the closure may be used to inspect the previous element:
|
|
@@ -452,11 +330,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
452
330
|
* chunks.toArray();
|
|
453
331
|
* // [["A", "A"], ["B", "B"], ["C", "C", "C"], ["D"]]
|
|
454
332
|
*/
|
|
455
|
-
chunkWhile(
|
|
456
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
457
|
-
throwOnNumberLimit?: boolean,
|
|
458
|
-
): ICollection<ICollection<TInput>>;
|
|
459
|
-
|
|
333
|
+
chunkWhile(filter: Filter<TInput, ICollection<TInput>>, throwOnNumberLimit?: boolean): ICollection<ICollection<TInput>>;
|
|
460
334
|
/**
|
|
461
335
|
* The split method breaks a collection into the given number of groups:
|
|
462
336
|
* @example
|
|
@@ -465,11 +339,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
465
339
|
* chunks.toArray();
|
|
466
340
|
* // [[1, 2], [3, 4], [5]]
|
|
467
341
|
*/
|
|
468
|
-
split(
|
|
469
|
-
chunkAmount: number,
|
|
470
|
-
throwOnNumberLimit?: boolean,
|
|
471
|
-
): ICollection<ICollection<TInput>>;
|
|
472
|
-
|
|
342
|
+
split(chunkAmount: number, throwOnNumberLimit?: boolean): ICollection<ICollection<TInput>>;
|
|
473
343
|
/**
|
|
474
344
|
* The partition method is used to separate elements that pass a given truth test from those that do not:
|
|
475
345
|
* @example
|
|
@@ -477,11 +347,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
477
347
|
* collection.partition(item => item < 3);
|
|
478
348
|
* // [[1, 2], [3, 4, 5, 6]]
|
|
479
349
|
*/
|
|
480
|
-
partition(
|
|
481
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
482
|
-
throwOnNumberLimit?: boolean,
|
|
483
|
-
): ICollection<ICollection<TInput>>;
|
|
484
|
-
|
|
350
|
+
partition(filter: Filter<TInput, ICollection<TInput>>, throwOnNumberLimit?: boolean): ICollection<ICollection<TInput>>;
|
|
485
351
|
/**
|
|
486
352
|
* The sliding method returns a new collection of chunks representing a "sliding window" view of the items in the collection:
|
|
487
353
|
* @experimental
|
|
@@ -491,7 +357,6 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
491
357
|
* // [[1, 2], [2, 3], [3, 4], [4, 5]]
|
|
492
358
|
*/
|
|
493
359
|
sliding(settings: SlidingSettings): ICollection<ICollection<TInput>>;
|
|
494
|
-
|
|
495
360
|
/**
|
|
496
361
|
* The groupBy method groups the collection's items by a given map function:
|
|
497
362
|
* @example
|
|
@@ -507,10 +372,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
507
372
|
* .map(([key, value]) => [key, value.toArray()]);
|
|
508
373
|
* // [["gmail.com", ["alice@gmail.com", "carlos@gmail.com"]], ["yahoo.com", ["bob@yahoo.com"]]]
|
|
509
374
|
*/
|
|
510
|
-
groupBy<TOutput = TInput>(
|
|
511
|
-
settings?: GroupBySettings<TInput, ICollection<TInput>, TOutput>,
|
|
512
|
-
): ICollection<RecordItem<TOutput, ICollection<TInput>>>;
|
|
513
|
-
|
|
375
|
+
groupBy<TOutput = TInput>(settings?: GroupBySettings<TInput, ICollection<TInput>, TOutput>): ICollection<RecordItem<TOutput, ICollection<TInput>>>;
|
|
514
376
|
/**
|
|
515
377
|
* The countBy method counts the occurrences of values in the collection.
|
|
516
378
|
* By default, the method counts the occurrences of every element, allowing you to count certain "types" of elements in the collection:
|
|
@@ -523,10 +385,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
523
385
|
* const count = collection.countBy(item => item.split("@")[1])
|
|
524
386
|
* // [["gmail.com", 2], ["yahoo.com", 1]]
|
|
525
387
|
*/
|
|
526
|
-
countBy<TOutput = TInput>(
|
|
527
|
-
settings?: GroupBySettings<TInput, ICollection<TInput>, TOutput>,
|
|
528
|
-
): ICollection<RecordItem<TOutput, number>>;
|
|
529
|
-
|
|
388
|
+
countBy<TOutput = TInput>(settings?: GroupBySettings<TInput, ICollection<TInput>, TOutput>): ICollection<RecordItem<TOutput, number>>;
|
|
530
389
|
/**
|
|
531
390
|
* The unique method removes all duplicate values from the collection:
|
|
532
391
|
* @example
|
|
@@ -548,10 +407,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
548
407
|
* { name: "Galaxy S6", brand: "Samsung", type: "phone" },
|
|
549
408
|
* ]
|
|
550
409
|
*/
|
|
551
|
-
unique<TOutput = TInput>(
|
|
552
|
-
settings?: GroupBySettings<TInput, ICollection<TInput>, TOutput>,
|
|
553
|
-
): ICollection<TInput>;
|
|
554
|
-
|
|
410
|
+
unique<TOutput = TInput>(settings?: GroupBySettings<TInput, ICollection<TInput>, TOutput>): ICollection<TInput>;
|
|
555
411
|
/**
|
|
556
412
|
* The diff method will return the values in the original collection that are not present in the given iterable:
|
|
557
413
|
* @example
|
|
@@ -560,11 +416,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
560
416
|
* difference.toArray();
|
|
561
417
|
* // [1, 3, 5]
|
|
562
418
|
*/
|
|
563
|
-
difference<TOutput = TInput>(
|
|
564
|
-
iterable: Iterable<TInput>,
|
|
565
|
-
map?: Map<TInput, ICollection<TInput>, TOutput>,
|
|
566
|
-
): ICollection<TInput>;
|
|
567
|
-
|
|
419
|
+
difference<TOutput = TInput>(iterable: Iterable<TInput>, map?: Map<TInput, ICollection<TInput>, TOutput>): ICollection<TInput>;
|
|
568
420
|
/**
|
|
569
421
|
* The repeat method will repat the current collection given amount
|
|
570
422
|
* @example
|
|
@@ -574,7 +426,6 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
574
426
|
* // [1, 2, 3, 1, 2, 3, 1, 2, 3]
|
|
575
427
|
*/
|
|
576
428
|
repeat(amount: number): ICollection<TInput>;
|
|
577
|
-
|
|
578
429
|
/**
|
|
579
430
|
* The padStart method pads this collection with another item (multiple times, if needed) until the resulting collection reaches the given length.
|
|
580
431
|
* The padding is applied from the start of this collection:
|
|
@@ -591,11 +442,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
591
442
|
* new ListCollection("abc").padStart(1, "_").join({ seperator: ""});
|
|
592
443
|
* // "abc"
|
|
593
444
|
*/
|
|
594
|
-
padStart<TExtended = TInput>(
|
|
595
|
-
maxLength: number,
|
|
596
|
-
fillItems: Iterable<TExtended>,
|
|
597
|
-
): ICollection<TInput | TExtended>;
|
|
598
|
-
|
|
445
|
+
padStart<TExtended = TInput>(maxLength: number, fillItems: Iterable<TExtended>): ICollection<TInput | TExtended>;
|
|
599
446
|
/**
|
|
600
447
|
* The padEnd method pads this collection with another item (multiple times, if needed) until the resulting collection reaches the given length.
|
|
601
448
|
* The padding is applied from the end of this collection:
|
|
@@ -612,17 +459,12 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
612
459
|
* new ListCollection("abc").padEnd(1, "_").join({ seperator: ""});
|
|
613
460
|
* // "abc"
|
|
614
461
|
*/
|
|
615
|
-
padEnd<TExtended = TInput>(
|
|
616
|
-
maxLength: number,
|
|
617
|
-
fillItems: Iterable<TExtended>,
|
|
618
|
-
): ICollection<TInput | TExtended>;
|
|
619
|
-
|
|
462
|
+
padEnd<TExtended = TInput>(maxLength: number, fillItems: Iterable<TExtended>): ICollection<TInput | TExtended>;
|
|
620
463
|
/**
|
|
621
464
|
* The slice is the same as Array.slice method. Se documentation on mdn:
|
|
622
465
|
* @link {https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice}
|
|
623
466
|
*/
|
|
624
467
|
slice(settings?: SliceSettings): ICollection<TInput>;
|
|
625
|
-
|
|
626
468
|
/**
|
|
627
469
|
* The prepend method adds items to the beginning of the collection:
|
|
628
470
|
* @example
|
|
@@ -630,10 +472,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
630
472
|
* collection.toArray();
|
|
631
473
|
* // [-1, 20, 1, 2, 3, 4, 5]
|
|
632
474
|
*/
|
|
633
|
-
prepend<TExtended = TInput>(
|
|
634
|
-
iterable: Iterable<TInput | TExtended>,
|
|
635
|
-
): ICollection<TInput | TExtended>;
|
|
636
|
-
|
|
475
|
+
prepend<TExtended = TInput>(iterable: Iterable<TInput | TExtended>): ICollection<TInput | TExtended>;
|
|
637
476
|
/**
|
|
638
477
|
* The append method adds items to the end of the collection:
|
|
639
478
|
* @example
|
|
@@ -641,10 +480,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
641
480
|
* collection.toArray();
|
|
642
481
|
* // [1, 2, 3, 4, 5, -1, -2,]
|
|
643
482
|
*/
|
|
644
|
-
append<TExtended = TInput>(
|
|
645
|
-
iterable: Iterable<TInput | TExtended>,
|
|
646
|
-
): ICollection<TInput | TExtended>;
|
|
647
|
-
|
|
483
|
+
append<TExtended = TInput>(iterable: Iterable<TInput | TExtended>): ICollection<TInput | TExtended>;
|
|
648
484
|
/**
|
|
649
485
|
* The insertBefore method adds items before a specific filtered item:
|
|
650
486
|
* @example
|
|
@@ -652,12 +488,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
652
488
|
* collection.toArray();
|
|
653
489
|
* // [1, -1, 20, 2, 2, 3, 4, 5]
|
|
654
490
|
*/
|
|
655
|
-
insertBefore<TExtended = TInput>(
|
|
656
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
657
|
-
iterable: Iterable<TInput | TExtended>,
|
|
658
|
-
throwOnNumberLimit?: boolean,
|
|
659
|
-
): ICollection<TInput | TExtended>;
|
|
660
|
-
|
|
491
|
+
insertBefore<TExtended = TInput>(filter: Filter<TInput, ICollection<TInput>>, iterable: Iterable<TInput | TExtended>, throwOnNumberLimit?: boolean): ICollection<TInput | TExtended>;
|
|
661
492
|
/**
|
|
662
493
|
* The insertAfter method adds items after a specific filtered item:
|
|
663
494
|
* @example
|
|
@@ -665,12 +496,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
665
496
|
* collection.toArray();
|
|
666
497
|
* // [1, 2, -1, 20, 2, 3, 4, 5]
|
|
667
498
|
*/
|
|
668
|
-
insertAfter<TExtended = TInput>(
|
|
669
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
670
|
-
iterable: Iterable<TInput | TExtended>,
|
|
671
|
-
throwOnNumberLimit?: boolean,
|
|
672
|
-
): ICollection<TInput | TExtended>;
|
|
673
|
-
|
|
499
|
+
insertAfter<TExtended = TInput>(filter: Filter<TInput, ICollection<TInput>>, iterable: Iterable<TInput | TExtended>, throwOnNumberLimit?: boolean): ICollection<TInput | TExtended>;
|
|
674
500
|
/**
|
|
675
501
|
* The crossJoin method cross joins the collection's values among the given arrays or collections, returning a Cartesian product with all possible permutations:
|
|
676
502
|
* @example
|
|
@@ -698,10 +524,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
698
524
|
* // [2, "b", "II"],
|
|
699
525
|
* // ]
|
|
700
526
|
*/
|
|
701
|
-
crossJoin<TExtended = TInput>(
|
|
702
|
-
...iterables: Array<Iterable<TExtended>>
|
|
703
|
-
): ICollection<ICollection<TInput | TExtended>>;
|
|
704
|
-
|
|
527
|
+
crossJoin<TExtended = TInput>(...iterables: Array<Iterable<TExtended>>): ICollection<ICollection<TInput | TExtended>>;
|
|
705
528
|
/**
|
|
706
529
|
* The zip method merges together the values of the given array with the values of the original collection at their corresponding index:
|
|
707
530
|
* @example
|
|
@@ -710,16 +533,10 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
710
533
|
* zipped.toArray();
|
|
711
534
|
* // [["Chari", 100], ["Desk", 200]]
|
|
712
535
|
*/
|
|
713
|
-
zip<TExtended>(
|
|
714
|
-
iterable: Iterable<TExtended>,
|
|
715
|
-
): ICollection<RecordItem<TInput, TExtended>>;
|
|
716
|
-
|
|
536
|
+
zip<TExtended>(iterable: Iterable<TExtended>): ICollection<RecordItem<TInput, TExtended>>;
|
|
717
537
|
sort(compare?: Comparator<TInput>): ICollection<TInput>;
|
|
718
|
-
|
|
719
538
|
reverse(settings?: ReverseSettings): ICollection<TInput>;
|
|
720
|
-
|
|
721
539
|
shuffle(): ICollection<TInput>;
|
|
722
|
-
|
|
723
540
|
/**
|
|
724
541
|
* The first method returns the first element in the collection that passes a given truth test. By default it will get the first element:
|
|
725
542
|
* @example
|
|
@@ -730,25 +547,14 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
730
547
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
731
548
|
* // 3
|
|
732
549
|
*/
|
|
733
|
-
first<TOutput extends TInput>(
|
|
734
|
-
settings?: FindSettings<TInput, ICollection<TInput>, TOutput>,
|
|
735
|
-
): TOutput | null;
|
|
736
|
-
|
|
550
|
+
first<TOutput extends TInput>(settings?: FindSettings<TInput, ICollection<TInput>, TOutput>): TOutput | null;
|
|
737
551
|
/**
|
|
738
552
|
* The firstOr method is the same as first method but will return a provided default value if not found
|
|
739
553
|
* @throws {CollectionError} {@link CollectionError}
|
|
740
554
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
741
555
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
742
556
|
*/
|
|
743
|
-
firstOr<TOutput extends TInput, TExtended = TInput>(
|
|
744
|
-
settings: FindOrSettings<
|
|
745
|
-
TInput,
|
|
746
|
-
ICollection<TInput>,
|
|
747
|
-
TOutput,
|
|
748
|
-
TExtended
|
|
749
|
-
>,
|
|
750
|
-
): TOutput | TExtended;
|
|
751
|
-
|
|
557
|
+
firstOr<TOutput extends TInput, TExtended = TInput>(settings: FindOrSettings<TInput, ICollection<TInput>, TOutput, TExtended>): TOutput | TExtended;
|
|
752
558
|
/**
|
|
753
559
|
* The firstOrFail method is the same as first method but will throw an Error if not found
|
|
754
560
|
* @throws {CollectionError} {@link CollectionError}
|
|
@@ -756,10 +562,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
756
562
|
* @throws {ItemNotFoundError} {@link ItemNotFoundError}
|
|
757
563
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
758
564
|
*/
|
|
759
|
-
firstOrFail<TOutput extends TInput>(
|
|
760
|
-
settings?: FindSettings<TInput, ICollection<TInput>, TOutput>,
|
|
761
|
-
): TOutput;
|
|
762
|
-
|
|
565
|
+
firstOrFail<TOutput extends TInput>(settings?: FindSettings<TInput, ICollection<TInput>, TOutput>): TOutput;
|
|
763
566
|
/**
|
|
764
567
|
* The last method returns the last element in the collection that passes a given truth test. By default it will get the last element:
|
|
765
568
|
* @example
|
|
@@ -770,25 +573,14 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
770
573
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
771
574
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
772
575
|
*/
|
|
773
|
-
last<TOutput extends TInput>(
|
|
774
|
-
settings?: FindSettings<TInput, ICollection<TInput>, TOutput>,
|
|
775
|
-
): TOutput | null;
|
|
776
|
-
|
|
576
|
+
last<TOutput extends TInput>(settings?: FindSettings<TInput, ICollection<TInput>, TOutput>): TOutput | null;
|
|
777
577
|
/**
|
|
778
578
|
* The lastOr method is the same as last method but will return a provided default value if not found
|
|
779
579
|
* @throws {CollectionError} {@link CollectionError}
|
|
780
580
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
781
581
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
782
582
|
*/
|
|
783
|
-
lastOr<TOutput extends TInput, TExtended = TInput>(
|
|
784
|
-
settings: FindOrSettings<
|
|
785
|
-
TInput,
|
|
786
|
-
ICollection<TInput>,
|
|
787
|
-
TOutput,
|
|
788
|
-
TExtended
|
|
789
|
-
>,
|
|
790
|
-
): TOutput | TExtended;
|
|
791
|
-
|
|
583
|
+
lastOr<TOutput extends TInput, TExtended = TInput>(settings: FindOrSettings<TInput, ICollection<TInput>, TOutput, TExtended>): TOutput | TExtended;
|
|
792
584
|
/**
|
|
793
585
|
* The lastOrFail method is the same as last method but will throw an Error if not found
|
|
794
586
|
* @throws {CollectionError} {@link CollectionError}
|
|
@@ -796,10 +588,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
796
588
|
* @throws {ItemNotFoundError} {@link ItemNotFoundError}
|
|
797
589
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
798
590
|
*/
|
|
799
|
-
lastOrFail<TOutput extends TInput>(
|
|
800
|
-
settings?: FindSettings<TInput, ICollection<TInput>, TOutput>,
|
|
801
|
-
): TOutput;
|
|
802
|
-
|
|
591
|
+
lastOrFail<TOutput extends TInput>(settings?: FindSettings<TInput, ICollection<TInput>, TOutput>): TOutput;
|
|
803
592
|
/**
|
|
804
593
|
* The before method is the opposite of the after method. It returns the item before the given item. null is returned if the given item is not found or is the first item:
|
|
805
594
|
* @example
|
|
@@ -814,23 +603,14 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
814
603
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
815
604
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
816
605
|
*/
|
|
817
|
-
before(
|
|
818
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
819
|
-
throwOnNumberLimit?: boolean,
|
|
820
|
-
): TInput | null;
|
|
821
|
-
|
|
606
|
+
before(filter: Filter<TInput, ICollection<TInput>>, throwOnNumberLimit?: boolean): TInput | null;
|
|
822
607
|
/**
|
|
823
608
|
* The beforeOr method is the same as before method but will return a provided default value if not found
|
|
824
609
|
* @throws {CollectionError} {@link CollectionError}
|
|
825
610
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
826
611
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
827
612
|
*/
|
|
828
|
-
beforeOr<TExtended = TInput>(
|
|
829
|
-
defaultValue: Lazyable<TExtended>,
|
|
830
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
831
|
-
throwOnNumberLimit?: boolean,
|
|
832
|
-
): TInput | TExtended;
|
|
833
|
-
|
|
613
|
+
beforeOr<TExtended = TInput>(defaultValue: Lazyable<TExtended>, filter: Filter<TInput, ICollection<TInput>>, throwOnNumberLimit?: boolean): TInput | TExtended;
|
|
834
614
|
/**
|
|
835
615
|
* The beforeOrFail method is the same as before method but will throw an Error if not found
|
|
836
616
|
* @throws {CollectionError} {@link CollectionError}
|
|
@@ -838,11 +618,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
838
618
|
* @throws {ItemNotFoundError} {@link ItemNotFoundError}
|
|
839
619
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
840
620
|
*/
|
|
841
|
-
beforeOrFail(
|
|
842
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
843
|
-
throwOnNumberLimit?: boolean,
|
|
844
|
-
): TInput;
|
|
845
|
-
|
|
621
|
+
beforeOrFail(filter: Filter<TInput, ICollection<TInput>>, throwOnNumberLimit?: boolean): TInput;
|
|
846
622
|
/**
|
|
847
623
|
* The after method returns the item after the given item. null is returned if the given item is not found or is the last item:
|
|
848
624
|
* @example
|
|
@@ -857,23 +633,14 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
857
633
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
858
634
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
859
635
|
*/
|
|
860
|
-
after(
|
|
861
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
862
|
-
throwOnNumberLimit?: boolean,
|
|
863
|
-
): TInput | null;
|
|
864
|
-
|
|
636
|
+
after(filter: Filter<TInput, ICollection<TInput>>, throwOnNumberLimit?: boolean): TInput | null;
|
|
865
637
|
/**
|
|
866
638
|
* The afterOr method is the same as after method but will return a provided default value if not found
|
|
867
639
|
* @throws {CollectionError} {@link CollectionError}
|
|
868
640
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
869
641
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
870
642
|
*/
|
|
871
|
-
afterOr<TExtended = TInput>(
|
|
872
|
-
defaultValue: Lazyable<TExtended>,
|
|
873
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
874
|
-
throwOnNumberLimit?: boolean,
|
|
875
|
-
): TInput | TExtended;
|
|
876
|
-
|
|
643
|
+
afterOr<TExtended = TInput>(defaultValue: Lazyable<TExtended>, filter: Filter<TInput, ICollection<TInput>>, throwOnNumberLimit?: boolean): TInput | TExtended;
|
|
877
644
|
/**
|
|
878
645
|
* The afterOrFail method is the same as after method but will throw an Error if not found
|
|
879
646
|
* @throws {CollectionError} {@link CollectionError}
|
|
@@ -881,11 +648,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
881
648
|
* @throws {ItemNotFoundError} {@link ItemNotFoundError}
|
|
882
649
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
883
650
|
*/
|
|
884
|
-
afterOrFail(
|
|
885
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
886
|
-
throwOnNumberLimit?: boolean,
|
|
887
|
-
): TInput;
|
|
888
|
-
|
|
651
|
+
afterOrFail(filter: Filter<TInput, ICollection<TInput>>, throwOnNumberLimit?: boolean): TInput;
|
|
889
652
|
/**
|
|
890
653
|
* The sole method returns the first element in the collection that passes a given truth test, but only if the truth test matches exactly one element:
|
|
891
654
|
* @example
|
|
@@ -898,11 +661,7 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
898
661
|
* @throws {MultipleItemsFoundError} {@link MultipleItemsFoundError}
|
|
899
662
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
900
663
|
*/
|
|
901
|
-
sole<TOutput extends TInput>(
|
|
902
|
-
filter: Filter<TInput, ICollection<TInput>, TOutput>,
|
|
903
|
-
throwOnNumberLimit?: boolean,
|
|
904
|
-
): TOutput;
|
|
905
|
-
|
|
664
|
+
sole<TOutput extends TInput>(filter: Filter<TInput, ICollection<TInput>, TOutput>, throwOnNumberLimit?: boolean): TOutput;
|
|
906
665
|
/**
|
|
907
666
|
* The nth method creates a new collection consisting of every n-th element:
|
|
908
667
|
* @example
|
|
@@ -911,7 +670,6 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
911
670
|
* // ["a", "e"]
|
|
912
671
|
*/
|
|
913
672
|
nth(step: number): ICollection<TInput>;
|
|
914
|
-
|
|
915
673
|
/**
|
|
916
674
|
* The count method returns the total number of items in the collection:
|
|
917
675
|
* @example
|
|
@@ -922,53 +680,38 @@ export type ICollection<TInput> = Iterable<TInput> & {
|
|
|
922
680
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
923
681
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
924
682
|
*/
|
|
925
|
-
count(
|
|
926
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
927
|
-
throwOnNumberLimit?: boolean,
|
|
928
|
-
): number;
|
|
929
|
-
|
|
683
|
+
count(filter: Filter<TInput, ICollection<TInput>>, throwOnNumberLimit?: boolean): number;
|
|
930
684
|
/**
|
|
931
685
|
* @throws {CollectionError} {@link CollectionError}
|
|
932
686
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
933
687
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
934
688
|
*/
|
|
935
689
|
size(throwOnNumberLimit?: boolean): number;
|
|
936
|
-
|
|
937
690
|
/**
|
|
938
691
|
* @throws {CollectionError} {@link CollectionError}
|
|
939
692
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
940
693
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
941
694
|
*/
|
|
942
695
|
empty(): boolean;
|
|
943
|
-
|
|
944
696
|
/**
|
|
945
697
|
* @throws {CollectionError} {@link CollectionError}
|
|
946
698
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
947
699
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
948
700
|
*/
|
|
949
701
|
notEmpty(): boolean;
|
|
950
|
-
|
|
951
702
|
/**
|
|
952
703
|
* The search method searches the collection for the given value and returns its index if found. If the item is not found, -1 is returned:
|
|
953
704
|
* @throws {CollectionError} {@link CollectionError}
|
|
954
705
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
955
706
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
956
707
|
*/
|
|
957
|
-
search(
|
|
958
|
-
filter: Filter<TInput, ICollection<TInput>>,
|
|
959
|
-
throwOnNumberLimit?: boolean,
|
|
960
|
-
): number;
|
|
961
|
-
|
|
708
|
+
search(filter: Filter<TInput, ICollection<TInput>>, throwOnNumberLimit?: boolean): number;
|
|
962
709
|
/**
|
|
963
710
|
* @throws {CollectionError} {@link CollectionError}
|
|
964
711
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|
|
965
712
|
* @throws {IndexOverflowError} {@link IndexOverflowError}
|
|
966
713
|
*/
|
|
967
|
-
forEach(
|
|
968
|
-
callback: ForEach<TInput, ICollection<TInput>>,
|
|
969
|
-
throwOnNumberLimit?: boolean,
|
|
970
|
-
): void;
|
|
971
|
-
|
|
714
|
+
forEach(callback: ForEach<TInput, ICollection<TInput>>, throwOnNumberLimit?: boolean): void;
|
|
972
715
|
/**
|
|
973
716
|
* @throws {CollectionError} {@link CollectionError}
|
|
974
717
|
* @throws {UnexpectedCollectionError} {@link UnexpectedCollectionError}
|