@daiso-tech/core 0.29.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/async/utilities/abort/abort.d.ts +1 -1
- package/dist/async/utilities/lazy-promise/lazy-promise.d.ts +4 -5
- package/dist/async/utilities/lazy-promise/lazy-promise.js +3 -3
- package/dist/async/utilities/lazy-promise/lazy-promise.js.map +1 -1
- package/dist/async/utilities/retry/retry.d.ts +1 -1
- package/dist/async/utilities/timeout/timeout.d.ts +1 -1
- package/dist/cache/contracts/cache-factory.contract.js +1 -1
- package/dist/cache/contracts/cache-factory.contract.js.map +1 -1
- package/dist/cache/contracts/cache.contract.d.ts +3 -3
- package/dist/cache/implementations/derivables/cache/cache.d.ts +14 -14
- package/dist/cache/implementations/derivables/cache/cache.js +3 -3
- package/dist/cache/implementations/derivables/cache/cache.js.map +1 -1
- package/dist/cache/implementations/derivables/cache/is-database-cache-adapter.js.map +1 -1
- package/dist/collection/contracts/_module-exports.d.ts +1 -1
- package/dist/collection/contracts/_module-exports.js +1 -1
- package/dist/collection/contracts/_module-exports.js.map +1 -1
- package/dist/collection/contracts/_shared/_module.d.ts +11 -0
- package/dist/collection/contracts/_shared/_module.js +12 -0
- package/dist/collection/contracts/_shared/_module.js.map +1 -0
- package/dist/collection/contracts/_shared/compartor.type.d.ts +9 -0
- package/dist/collection/contracts/_shared/compartor.type.js +5 -0
- package/dist/collection/contracts/_shared/compartor.type.js.map +1 -0
- package/dist/collection/contracts/_shared/cross-join-result.type.d.ts +11 -0
- package/dist/collection/contracts/_shared/cross-join-result.type.js +5 -0
- package/dist/collection/contracts/_shared/cross-join-result.type.js.map +1 -0
- package/dist/collection/contracts/_shared/ensure-map.type.d.ts +8 -0
- package/dist/collection/contracts/_shared/ensure-map.type.js +5 -0
- package/dist/collection/contracts/_shared/ensure-map.type.js.map +1 -0
- package/dist/collection/contracts/_shared/ensure-record.type.d.ts +8 -0
- package/dist/collection/contracts/_shared/ensure-record.type.js +5 -0
- package/dist/collection/contracts/_shared/ensure-record.type.js.map +1 -0
- package/dist/collection/contracts/_shared/foreach.type.d.ts +22 -0
- package/dist/collection/contracts/_shared/foreach.type.js +5 -0
- package/dist/collection/contracts/_shared/foreach.type.js.map +1 -0
- package/dist/collection/contracts/_shared/map.type.d.ts +22 -0
- package/dist/collection/contracts/{_shared.js → _shared/map.type.js} +1 -1
- package/dist/collection/contracts/_shared/map.type.js.map +1 -0
- package/dist/collection/contracts/_shared/modifier.type.d.ts +18 -0
- package/dist/collection/contracts/_shared/modifier.type.js +5 -0
- package/dist/collection/contracts/_shared/modifier.type.js.map +1 -0
- package/dist/collection/contracts/_shared/predicate.type.d.ts +49 -0
- package/dist/collection/contracts/_shared/predicate.type.js +5 -0
- package/dist/collection/contracts/_shared/predicate.type.js.map +1 -0
- package/dist/collection/contracts/_shared/reduce.type.d.ts +24 -0
- package/dist/collection/contracts/_shared/reduce.type.js +5 -0
- package/dist/collection/contracts/_shared/reduce.type.js.map +1 -0
- package/dist/collection/contracts/_shared/tap.type.d.ts +16 -0
- package/dist/collection/contracts/_shared/tap.type.js +5 -0
- package/dist/collection/contracts/_shared/tap.type.js.map +1 -0
- package/dist/collection/contracts/_shared/transform.type.d.ts +16 -0
- package/dist/collection/contracts/_shared/transform.type.js +5 -0
- package/dist/collection/contracts/_shared/transform.type.js.map +1 -0
- package/dist/collection/contracts/async-collection.contract.d.ts +3 -3
- package/dist/collection/contracts/collection.contract.d.ts +31 -31
- package/dist/collection/contracts/collection.errors.d.ts +1 -1
- package/dist/collection/contracts/collection.errors.js +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-chunk-while-iterable.js +2 -2
- package/dist/collection/implementations/async-iterable-collection/_shared/async-chunk-while-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-count-by-iterable.js +2 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-count-by-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-filter-iterable.js +2 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-filter-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-flat-map-iterable.js +2 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-flat-map-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-group-by-iterable.js +2 -2
- package/dist/collection/implementations/async-iterable-collection/_shared/async-group-by-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-insert-after-iterable.js +2 -2
- package/dist/collection/implementations/async-iterable-collection/_shared/async-insert-after-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-insert-before-iterable.js +2 -2
- package/dist/collection/implementations/async-iterable-collection/_shared/async-insert-before-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-map-iterable.js +2 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-map-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-partion-iterable.js +2 -2
- package/dist/collection/implementations/async-iterable-collection/_shared/async-partion-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-skip-until-iterable.js +2 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-skip-until-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-sort-iterable.js +6 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-sort-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-take-until-iterable.js +2 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-take-until-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-tap-iterable.js +2 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-tap-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-unique-iterable.js +2 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-unique-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-update-iterable.js +3 -2
- package/dist/collection/implementations/async-iterable-collection/_shared/async-update-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-when-iterable.js +2 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-when-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.d.ts +3 -3
- package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.js +25 -24
- package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/chunk-while-iterable.d.ts +2 -2
- package/dist/collection/implementations/iterable-collection/_shared/chunk-while-iterable.js +2 -1
- package/dist/collection/implementations/iterable-collection/_shared/chunk-while-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/count-by-iterable.js +2 -1
- package/dist/collection/implementations/iterable-collection/_shared/count-by-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/filter-iterable.d.ts +2 -2
- package/dist/collection/implementations/iterable-collection/_shared/filter-iterable.js +2 -1
- package/dist/collection/implementations/iterable-collection/_shared/filter-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/flat-map-iterable.js +2 -1
- package/dist/collection/implementations/iterable-collection/_shared/flat-map-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/group-by-iterable.js +2 -1
- package/dist/collection/implementations/iterable-collection/_shared/group-by-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/insert-after-iterable.d.ts +2 -2
- package/dist/collection/implementations/iterable-collection/_shared/insert-after-iterable.js +3 -1
- package/dist/collection/implementations/iterable-collection/_shared/insert-after-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/insert-before-iterable.d.ts +2 -2
- package/dist/collection/implementations/iterable-collection/_shared/insert-before-iterable.js +3 -1
- package/dist/collection/implementations/iterable-collection/_shared/insert-before-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/map-iterable.js +2 -1
- package/dist/collection/implementations/iterable-collection/_shared/map-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/partion-iterable.d.ts +2 -2
- package/dist/collection/implementations/iterable-collection/_shared/partion-iterable.js +2 -1
- package/dist/collection/implementations/iterable-collection/_shared/partion-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/skip-until-iterable.d.ts +2 -2
- package/dist/collection/implementations/iterable-collection/_shared/skip-until-iterable.js +2 -1
- package/dist/collection/implementations/iterable-collection/_shared/skip-until-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/sort-iterable.js +6 -1
- package/dist/collection/implementations/iterable-collection/_shared/sort-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/take-until-iterable.d.ts +2 -2
- package/dist/collection/implementations/iterable-collection/_shared/take-until-iterable.js +2 -1
- package/dist/collection/implementations/iterable-collection/_shared/take-until-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/tap-iterable.js +2 -1
- package/dist/collection/implementations/iterable-collection/_shared/tap-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/unique-iterable.js +2 -1
- package/dist/collection/implementations/iterable-collection/_shared/unique-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/update-iterable.d.ts +2 -2
- package/dist/collection/implementations/iterable-collection/_shared/update-iterable.js +3 -2
- package/dist/collection/implementations/iterable-collection/_shared/update-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/when-iterable.js +2 -1
- package/dist/collection/implementations/iterable-collection/_shared/when-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/iterable-collection.d.ts +31 -31
- package/dist/collection/implementations/iterable-collection/iterable-collection.js +23 -22
- package/dist/collection/implementations/iterable-collection/iterable-collection.js.map +1 -1
- package/dist/collection/implementations/list-collection/list-collection.d.ts +31 -31
- package/dist/collection/implementations/list-collection/list-collection.js +44 -38
- package/dist/collection/implementations/list-collection/list-collection.js.map +1 -1
- package/dist/event-bus/contracts/event-bus-adapter.contract.d.ts +10 -4
- package/dist/event-bus/contracts/event-bus.contract.d.ts +22 -9
- package/dist/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.d.ts +3 -4
- package/dist/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.js +0 -1
- package/dist/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.js.map +1 -1
- package/dist/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.d.ts +3 -4
- package/dist/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.js.map +1 -1
- package/dist/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.d.ts +3 -4
- package/dist/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.js +0 -1
- package/dist/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.js.map +1 -1
- package/dist/event-bus/implementations/derivables/event-bus/event-bus.d.ts +11 -11
- package/dist/event-bus/implementations/derivables/event-bus/event-bus.js +2 -2
- package/dist/event-bus/implementations/derivables/event-bus/event-bus.js.map +1 -1
- package/dist/event-bus/implementations/derivables/event-bus/listener-store.d.ts +4 -4
- package/dist/event-bus/implementations/derivables/event-bus/listener-store.js +1 -1
- package/dist/event-bus/implementations/derivables/event-bus/listener-store.js.map +1 -1
- package/dist/event-bus/implementations/test-utilities/event-bus.test-suite.js.map +1 -1
- package/dist/lock/contracts/lock-provider-factory.contract.js +1 -1
- package/dist/lock/contracts/lock-provider-factory.contract.js.map +1 -1
- package/dist/lock/contracts/lock.contract.d.ts +5 -5
- package/dist/lock/contracts/lock.events.d.ts +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock-provider.d.ts +12 -12
- package/dist/lock/implementations/derivables/lock-provider/lock-provider.js +3 -3
- package/dist/lock/implementations/derivables/lock-provider/lock-provider.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock-serde-transformer.d.ts +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock.d.ts +14 -14
- package/dist/lock/implementations/derivables/lock-provider/lock.js +5 -17
- package/dist/lock/implementations/derivables/lock-provider/lock.js.map +1 -1
- package/dist/utilities/_module-exports.d.ts +2 -2
- package/dist/utilities/_module-exports.js +2 -2
- package/dist/utilities/_module-exports.js.map +1 -1
- package/dist/utilities/classes/_module.d.ts +0 -1
- package/dist/utilities/classes/_module.js +0 -1
- package/dist/utilities/classes/_module.js.map +1 -1
- package/dist/utilities/classes/key-prefixer/key-prefixer.contract.d.ts +1 -1
- package/dist/utilities/classes/key-prefixer/key-prefixer.d.ts +1 -1
- package/dist/utilities/classes/key-prefixer/key-prefixer.js +1 -1
- package/dist/utilities/classes/key-prefixer/key-prefixer.js.map +1 -1
- package/dist/utilities/functions/_module-exports.d.ts +7 -0
- package/dist/utilities/functions/_module-exports.js +8 -0
- package/dist/utilities/functions/_module-exports.js.map +1 -0
- package/dist/utilities/functions/factory.d.ts +44 -0
- package/dist/utilities/functions/factory.js +80 -0
- package/dist/utilities/functions/factory.js.map +1 -0
- package/dist/utilities/functions/get-constructor-name.d.ts +7 -0
- package/dist/utilities/functions/get-constructor-name.js +10 -0
- package/dist/utilities/functions/get-constructor-name.js.map +1 -0
- package/dist/utilities/functions/invokable.d.ts +20 -0
- package/dist/utilities/functions/invokable.js +33 -0
- package/dist/utilities/functions/invokable.js.map +1 -0
- package/dist/utilities/functions/is-nullable.d.ts +7 -0
- package/dist/utilities/functions/is-nullable.js +10 -0
- package/dist/utilities/functions/is-nullable.js.map +1 -0
- package/dist/utilities/functions/lazy.d.ts +20 -0
- package/dist/utilities/functions/lazy.js +39 -0
- package/dist/utilities/functions/lazy.js.map +1 -0
- package/dist/utilities/functions/object.d.ts +15 -0
- package/dist/utilities/functions/object.js +33 -0
- package/dist/utilities/functions/object.js.map +1 -0
- package/dist/utilities/functions/resolve-one-or-more.d.ts +12 -0
- package/dist/utilities/functions/resolve-one-or-more.js +25 -0
- package/dist/utilities/functions/resolve-one-or-more.js.map +1 -0
- package/dist/utilities/types/_module.d.ts +10 -0
- package/dist/utilities/types/_module.js +11 -0
- package/dist/utilities/types/_module.js.map +1 -0
- package/dist/utilities/types/async-iterable-value.type.d.ts +8 -0
- package/dist/utilities/types/async-iterable-value.type.js +5 -0
- package/dist/utilities/types/async-iterable-value.type.js.map +1 -0
- package/dist/utilities/types/at-least-one.type.d.ts +8 -0
- package/dist/utilities/types/at-least-one.type.js +5 -0
- package/dist/utilities/types/at-least-one.type.js.map +1 -0
- package/dist/utilities/types/factory.type.d.ts +49 -0
- package/dist/utilities/types/factory.type.js +5 -0
- package/dist/utilities/types/factory.type.js.map +1 -0
- package/dist/utilities/types/invokable.type.d.ts +20 -0
- package/dist/utilities/types/invokable.type.js +5 -0
- package/dist/utilities/types/invokable.type.js.map +1 -0
- package/dist/utilities/types/items.type.d.ts +8 -0
- package/dist/utilities/types/items.type.js +5 -0
- package/dist/utilities/types/items.type.js.map +1 -0
- package/dist/utilities/types/lazy.type.d.ts +31 -0
- package/dist/utilities/{types.js → types/lazy.type.js} +1 -1
- package/dist/utilities/types/lazy.type.js.map +1 -0
- package/dist/utilities/types/none-func.type.d.ts +8 -0
- package/dist/utilities/types/none-func.type.js +5 -0
- package/dist/utilities/types/none-func.type.js.map +1 -0
- package/dist/utilities/types/one-or-more.type.d.ts +8 -0
- package/dist/utilities/types/one-or-more.type.js +5 -0
- package/dist/utilities/types/one-or-more.type.js.map +1 -0
- package/dist/utilities/types/promiseable.type.d.ts +8 -0
- package/dist/utilities/types/promiseable.type.js +5 -0
- package/dist/utilities/types/promiseable.type.js.map +1 -0
- package/dist/utilities/types/result.type.d.ts +8 -0
- package/dist/utilities/types/result.type.js +5 -0
- package/dist/utilities/types/result.type.js.map +1 -0
- package/package.json +1 -1
- package/dist/collection/contracts/_shared.d.ts +0 -141
- package/dist/collection/contracts/_shared.js.map +0 -1
- package/dist/utilities/classes/pipeline/_module.d.ts +0 -1
- package/dist/utilities/classes/pipeline/_module.js +0 -2
- package/dist/utilities/classes/pipeline/_module.js.map +0 -1
- package/dist/utilities/classes/pipeline/pipeline.d.ts +0 -46
- package/dist/utilities/classes/pipeline/pipeline.js +0 -76
- package/dist/utilities/classes/pipeline/pipeline.js.map +0 -1
- package/dist/utilities/functions.d.ts +0 -57
- package/dist/utilities/functions.js +0 -123
- package/dist/utilities/functions.js.map +0 -1
- package/dist/utilities/types.d.ts +0 -104
- package/dist/utilities/types.js.map +0 -1
package/dist/collection/implementations/iterable-collection/_shared/chunk-while-iterable.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
|
-
import { type
|
|
4
|
+
import { type PredicateInvokable, type ICollection } from "../../../../collection/contracts/_module-exports.js";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
@@ -9,6 +9,6 @@ export declare class ChunkWhileIterable<TInput> implements Iterable<ICollection<
|
|
|
9
9
|
private collection;
|
|
10
10
|
private predicateFn;
|
|
11
11
|
private makeCollection;
|
|
12
|
-
constructor(collection: ICollection<TInput>, predicateFn:
|
|
12
|
+
constructor(collection: ICollection<TInput>, predicateFn: PredicateInvokable<TInput, ICollection<TInput>>, makeCollection: <TInput>(iterable: Iterable<TInput>) => ICollection<TInput>);
|
|
13
13
|
[Symbol.iterator](): Iterator<ICollection<TInput>>;
|
|
14
14
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../collection/contracts/_module-exports.js";
|
|
5
|
+
import { resolveInvokable } from "../../../../utilities/_module-exports.js";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -20,7 +21,7 @@ export class ChunkWhileIterable {
|
|
|
20
21
|
if (index === 0) {
|
|
21
22
|
array.push(item);
|
|
22
23
|
}
|
|
23
|
-
else if (this.predicateFn(item, index, this.makeCollection(array))) {
|
|
24
|
+
else if (resolveInvokable(this.predicateFn)(item, index, this.makeCollection(array))) {
|
|
24
25
|
array.push(item);
|
|
25
26
|
}
|
|
26
27
|
else {
|
package/dist/collection/implementations/iterable-collection/_shared/chunk-while-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-while-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/chunk-while-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"chunk-while-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/chunk-while-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAIf;IACA;IACA;IAHZ,YACY,UAA+B,EAC/B,WAA4D,EAC5D,cAEgB;QAJhB,eAAU,GAAV,UAAU,CAAqB;QAC/B,gBAAW,GAAX,WAAW,CAAiD;QAC5D,mBAAc,GAAd,cAAc,CAEE;IACzB,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;gBACd,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;iBAAM,IACH,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAC9B,IAAI,EACJ,KAAK,EACL,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAC7B,EACH,CAAC;gBACC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;iBAAM,CAAC;gBACJ,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;gBACjC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;gBACjB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;QACL,CAAC;QACD,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;CACJ"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../collection/contracts/_module-exports.js";
|
|
5
|
+
import { resolveInvokable } from "../../../../utilities/_module-exports.js";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -15,7 +16,7 @@ export class CountByIterable {
|
|
|
15
16
|
*[Symbol.iterator]() {
|
|
16
17
|
const map = new Map();
|
|
17
18
|
for (const [index, item] of this.collection.entries()) {
|
|
18
|
-
const key = this.selectFn(item, index, this.collection);
|
|
19
|
+
const key = resolveInvokable(this.selectFn)(item, index, this.collection);
|
|
19
20
|
if (!map.has(key)) {
|
|
20
21
|
map.set(key, 0);
|
|
21
22
|
}
|
package/dist/collection/implementations/iterable-collection/_shared/count-by-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"count-by-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/count-by-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"count-by-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/count-by-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,eAAe;IAIZ;IACA;IAFZ,YACY,UAA+B,EAC/B,WAAsD,CAAC,IAAI,EAAE,EAAE,CACnE,IAA0B;QAFtB,eAAU,GAAV,UAAU,CAAqB;QAC/B,aAAQ,GAAR,QAAQ,CACc;IAC/B,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,MAAM,GAAG,GAAG,IAAI,GAAG,EAAmB,CAAC;QACvC,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,MAAM,GAAG,GAAG,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CACvC,IAAI,EACJ,KAAK,EACL,IAAI,CAAC,UAAU,CAClB,CAAC;YACF,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBAChB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACpB,CAAC;YACD,MAAM,OAAO,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBACxB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC;YAC9B,CAAC;QACL,CAAC;QACD,KAAK,CAAC,CAAC,GAAG,CAAC;IACf,CAAC;CACJ"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
|
-
import { type
|
|
4
|
+
import { type PredicateInvokable, type ICollection } from "../../../../collection/contracts/_module-exports.js";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
8
|
export declare class FilterIterable<TInput, TOutput extends TInput> implements Iterable<TOutput> {
|
|
9
9
|
private collection;
|
|
10
10
|
private predicateFn;
|
|
11
|
-
constructor(collection: ICollection<TInput>, predicateFn:
|
|
11
|
+
constructor(collection: ICollection<TInput>, predicateFn: PredicateInvokable<TInput, ICollection<TInput>, TOutput>);
|
|
12
12
|
[Symbol.iterator](): Iterator<TOutput>;
|
|
13
13
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../collection/contracts/_module-exports.js";
|
|
5
|
+
import { resolveInvokable } from "../../../../utilities/_module-exports.js";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -14,7 +15,7 @@ export class FilterIterable {
|
|
|
14
15
|
}
|
|
15
16
|
*[Symbol.iterator]() {
|
|
16
17
|
for (const [index, item] of this.collection.entries()) {
|
|
17
|
-
if (this.predicateFn(item, index, this.collection)) {
|
|
18
|
+
if (resolveInvokable(this.predicateFn)(item, index, this.collection)) {
|
|
18
19
|
yield item;
|
|
19
20
|
}
|
|
20
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/filter-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"filter-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/filter-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,cAAc;IAIX;IACA;IAFZ,YACY,UAA+B,EAC/B,WAIP;QALO,eAAU,GAAV,UAAU,CAAqB;QAC/B,gBAAW,GAAX,WAAW,CAIlB;IACF,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,IACI,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,EAClE,CAAC;gBACC,MAAM,IAAe,CAAC;YAC1B,CAAC;QACL,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../collection/contracts/_module-exports.js";
|
|
5
|
+
import { resolveInvokable } from "../../../../utilities/_module-exports.js";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -14,7 +15,7 @@ export class FlatMapIterable {
|
|
|
14
15
|
}
|
|
15
16
|
*[Symbol.iterator]() {
|
|
16
17
|
for (const [index, item] of this.collection.entries()) {
|
|
17
|
-
yield* this.mapFn(item, index, this.collection);
|
|
18
|
+
yield* resolveInvokable(this.mapFn)(item, index, this.collection);
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
}
|
package/dist/collection/implementations/iterable-collection/_shared/flat-map-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flat-map-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/flat-map-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"flat-map-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/flat-map-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,eAAe;IAEZ;IACA;IAFZ,YACY,UAA+B,EAC/B,KAA0D;QAD1D,eAAU,GAAV,UAAU,CAAqB;QAC/B,UAAK,GAAL,KAAK,CAAqD;IACnE,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,KAAK,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACtE,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../collection/contracts/_module-exports.js";
|
|
5
|
+
import { resolveInvokable } from "../../../../utilities/_module-exports.js";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -17,7 +18,7 @@ export class GroupByIterable {
|
|
|
17
18
|
*[Symbol.iterator]() {
|
|
18
19
|
const map = new Map();
|
|
19
20
|
for (const [index, item] of this.collection.entries()) {
|
|
20
|
-
const key = this.selectFn(item, index, this.collection);
|
|
21
|
+
const key = resolveInvokable(this.selectFn)(item, index, this.collection);
|
|
21
22
|
let array = map.get(key);
|
|
22
23
|
if (array === undefined) {
|
|
23
24
|
array = [];
|
package/dist/collection/implementations/iterable-collection/_shared/group-by-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-by-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/group-by-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"group-by-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/group-by-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,eAAe;IAIZ;IACA;IAGA;IALZ,YACY,UAA+B,EAC/B,WAAsD,CAAC,IAAI,EAAE,EAAE,CACnE,IAA0B,EAEtB,cAEgB;QANhB,eAAU,GAAV,UAAU,CAAqB;QAC/B,aAAQ,GAAR,QAAQ,CACc;QAEtB,mBAAc,GAAd,cAAc,CAEE;IACzB,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,MAAM,GAAG,GAAG,IAAI,GAAG,EAA0B,CAAC;QAC9C,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,MAAM,GAAG,GAAG,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CACvC,IAAI,EACJ,KAAK,EACL,IAAI,CAAC,UAAU,CAClB,CAAC;YACF,IAAI,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACzB,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACtB,KAAK,GAAG,EAAE,CAAC;gBACX,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YACxB,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACxB,CAAC;QACD,KAAK,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,GAAG,CAC/B,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CACtD,CAAC;IACN,CAAC;CACJ"}
|
package/dist/collection/implementations/iterable-collection/_shared/insert-after-iterable.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
|
-
import { type
|
|
4
|
+
import { type PredicateInvokable, type ICollection } from "../../../../collection/contracts/_module-exports.js";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
@@ -9,6 +9,6 @@ export declare class InsertAfterIterable<TInput, TExtended> implements Iterable<
|
|
|
9
9
|
private collection;
|
|
10
10
|
private predicateFn;
|
|
11
11
|
private iterable;
|
|
12
|
-
constructor(collection: ICollection<TInput>, predicateFn:
|
|
12
|
+
constructor(collection: ICollection<TInput>, predicateFn: PredicateInvokable<TInput, ICollection<TInput>>, iterable: Iterable<TInput | TExtended>);
|
|
13
13
|
[Symbol.iterator](): Iterator<TInput | TExtended>;
|
|
14
14
|
}
|
package/dist/collection/implementations/iterable-collection/_shared/insert-after-iterable.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../collection/contracts/_module-exports.js";
|
|
5
|
+
import { resolveInvokable } from "../../../../utilities/_module-exports.js";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -18,7 +19,8 @@ export class InsertAfterIterable {
|
|
|
18
19
|
let hasMatched = false;
|
|
19
20
|
for (const [index, item] of this.collection.entries()) {
|
|
20
21
|
yield item;
|
|
21
|
-
if (!hasMatched &&
|
|
22
|
+
if (!hasMatched &&
|
|
23
|
+
resolveInvokable(this.predicateFn)(item, index, this.collection)) {
|
|
22
24
|
yield* this.iterable;
|
|
23
25
|
hasMatched = true;
|
|
24
26
|
}
|
package/dist/collection/implementations/iterable-collection/_shared/insert-after-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insert-after-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/insert-after-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"insert-after-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/insert-after-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAIhB;IACA;IACA;IAHZ,YACY,UAA+B,EAC/B,WAA4D,EAC5D,QAAsC;QAFtC,eAAU,GAAV,UAAU,CAAqB;QAC/B,gBAAW,GAAX,WAAW,CAAiD;QAC5D,aAAQ,GAAR,QAAQ,CAA8B;IAC/C,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,IAAI,UAAU,GAAG,KAAK,CAAC;QACvB,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,MAAM,IAAI,CAAC;YACX,IACI,CAAC,UAAU;gBACX,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,EAClE,CAAC;gBACC,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;gBACrB,UAAU,GAAG,IAAI,CAAC;YACtB,CAAC;QACL,CAAC;IACL,CAAC;CACJ"}
|
package/dist/collection/implementations/iterable-collection/_shared/insert-before-iterable.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
|
-
import { type
|
|
4
|
+
import { type PredicateInvokable, type ICollection } from "../../../../collection/contracts/_module-exports.js";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
@@ -9,6 +9,6 @@ export declare class InsertBeforeIterable<TInput, TExtended> implements Iterable
|
|
|
9
9
|
private collection;
|
|
10
10
|
private predicateFn;
|
|
11
11
|
private iterable;
|
|
12
|
-
constructor(collection: ICollection<TInput>, predicateFn:
|
|
12
|
+
constructor(collection: ICollection<TInput>, predicateFn: PredicateInvokable<TInput, ICollection<TInput>>, iterable: Iterable<TInput | TExtended>);
|
|
13
13
|
[Symbol.iterator](): Iterator<TInput | TExtended>;
|
|
14
14
|
}
|
package/dist/collection/implementations/iterable-collection/_shared/insert-before-iterable.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../collection/contracts/_module-exports.js";
|
|
5
|
+
import { resolveInvokable } from "../../../../utilities/_module-exports.js";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -17,7 +18,8 @@ export class InsertBeforeIterable {
|
|
|
17
18
|
*[Symbol.iterator]() {
|
|
18
19
|
let hasMatched = false;
|
|
19
20
|
for (const [index, item] of this.collection.entries()) {
|
|
20
|
-
if (!hasMatched &&
|
|
21
|
+
if (!hasMatched &&
|
|
22
|
+
resolveInvokable(this.predicateFn)(item, index, this.collection)) {
|
|
21
23
|
yield* this.iterable;
|
|
22
24
|
hasMatched = true;
|
|
23
25
|
}
|
package/dist/collection/implementations/iterable-collection/_shared/insert-before-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insert-before-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/insert-before-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"insert-before-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/insert-before-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAIjB;IACA;IACA;IAHZ,YACY,UAA+B,EAC/B,WAA4D,EAC5D,QAAsC;QAFtC,eAAU,GAAV,UAAU,CAAqB;QAC/B,gBAAW,GAAX,WAAW,CAAiD;QAC5D,aAAQ,GAAR,QAAQ,CAA8B;IAC/C,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,IAAI,UAAU,GAAG,KAAK,CAAC;QACvB,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,IACI,CAAC,UAAU;gBACX,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,EAClE,CAAC;gBACC,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;gBACrB,UAAU,GAAG,IAAI,CAAC;YACtB,CAAC;YACD,MAAM,IAAI,CAAC;QACf,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../collection/contracts/_module-exports.js";
|
|
5
|
+
import { resolveInvokable } from "../../../../utilities/_module-exports.js";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -14,7 +15,7 @@ export class MapIterable {
|
|
|
14
15
|
}
|
|
15
16
|
*[Symbol.iterator]() {
|
|
16
17
|
for (const [index, item] of this.collection.entries()) {
|
|
17
|
-
yield this.mapFn(item, index, this.collection);
|
|
18
|
+
yield resolveInvokable(this.mapFn)(item, index, this.collection);
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/map-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"map-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/map-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,WAAW;IAER;IACA;IAFZ,YACY,UAA+B,EAC/B,KAAgD;QADhD,eAAU,GAAV,UAAU,CAAqB;QAC/B,UAAK,GAAL,KAAK,CAA2C;IACzD,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,MAAM,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACrE,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
|
-
import { type
|
|
4
|
+
import { type PredicateInvokable, type ICollection } from "../../../../collection/contracts/_module-exports.js";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
@@ -9,6 +9,6 @@ export declare class PartionIterable<TInput> implements Iterable<ICollection<TIn
|
|
|
9
9
|
private collection;
|
|
10
10
|
private predicateFn;
|
|
11
11
|
private makeCollection;
|
|
12
|
-
constructor(collection: ICollection<TInput>, predicateFn:
|
|
12
|
+
constructor(collection: ICollection<TInput>, predicateFn: PredicateInvokable<TInput, ICollection<TInput>>, makeCollection: <TInput>(iterable: Iterable<TInput>) => ICollection<TInput>);
|
|
13
13
|
[Symbol.iterator](): Iterator<ICollection<TInput>>;
|
|
14
14
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../collection/contracts/_module-exports.js";
|
|
5
|
+
import { resolveInvokable } from "../../../../utilities/_module-exports.js";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -18,7 +19,7 @@ export class PartionIterable {
|
|
|
18
19
|
const arrayA = [];
|
|
19
20
|
const arrayB = [];
|
|
20
21
|
for (const [index, item] of this.collection.entries()) {
|
|
21
|
-
if (this.predicateFn(item, index, this.collection)) {
|
|
22
|
+
if (resolveInvokable(this.predicateFn)(item, index, this.collection)) {
|
|
22
23
|
arrayA.push(item);
|
|
23
24
|
}
|
|
24
25
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partion-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/partion-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"partion-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/partion-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,eAAe;IAEZ;IACA;IAEA;IAJZ,YACY,UAA+B,EAC/B,WAA4D,EAE5D,cAEgB;QALhB,eAAU,GAAV,UAAU,CAAqB;QAC/B,gBAAW,GAAX,WAAW,CAAiD;QAE5D,mBAAc,GAAd,cAAc,CAEE;IACzB,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,IACI,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,EAClE,CAAC;gBACC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC;iBAAM,CAAC;gBACJ,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC;QACL,CAAC;QACD,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAClC,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;CACJ"}
|
package/dist/collection/implementations/iterable-collection/_shared/skip-until-iterable.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
|
-
import { type
|
|
4
|
+
import { type PredicateInvokable, type ICollection } from "../../../../collection/contracts/_module-exports.js";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
8
|
export declare class SkipUntilIterable<TInput> implements Iterable<TInput> {
|
|
9
9
|
private collection;
|
|
10
10
|
private predicateFn;
|
|
11
|
-
constructor(collection: ICollection<TInput>, predicateFn:
|
|
11
|
+
constructor(collection: ICollection<TInput>, predicateFn: PredicateInvokable<TInput, ICollection<TInput>>);
|
|
12
12
|
[Symbol.iterator](): Iterator<TInput>;
|
|
13
13
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../collection/contracts/_module-exports.js";
|
|
5
|
+
import { resolveInvokable } from "../../../../utilities/_module-exports.js";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -16,7 +17,7 @@ export class SkipUntilIterable {
|
|
|
16
17
|
let hasMatched = false;
|
|
17
18
|
for (const [index, item] of this.collection.entries()) {
|
|
18
19
|
if (!hasMatched) {
|
|
19
|
-
hasMatched = this.predicateFn(item, index, this.collection);
|
|
20
|
+
hasMatched = resolveInvokable(this.predicateFn)(item, index, this.collection);
|
|
20
21
|
}
|
|
21
22
|
if (hasMatched) {
|
|
22
23
|
yield item;
|
package/dist/collection/implementations/iterable-collection/_shared/skip-until-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skip-until-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/skip-until-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"skip-until-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/skip-until-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAEd;IACA;IAFZ,YACY,UAA+B,EAC/B,WAA4D;QAD5D,eAAU,GAAV,UAAU,CAAqB;QAC/B,gBAAW,GAAX,WAAW,CAAiD;IACrE,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,IAAI,UAAU,GAAG,KAAK,CAAC;QACvB,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,IAAI,CAAC,UAAU,EAAE,CAAC;gBACd,UAAU,GAAG,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAC3C,IAAI,EACJ,KAAK,EACL,IAAI,CAAC,UAAU,CAClB,CAAC;YACN,CAAC;YACD,IAAI,UAAU,EAAE,CAAC;gBACb,MAAM,IAAI,CAAC;YACf,CAAC;QACL,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../collection/contracts/_module-exports.js";
|
|
5
|
+
import { resolveInvokable } from "../../../../utilities/_module-exports.js";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -13,7 +14,11 @@ export class SortIterable {
|
|
|
13
14
|
this.comparator = comparator;
|
|
14
15
|
}
|
|
15
16
|
*[Symbol.iterator]() {
|
|
16
|
-
|
|
17
|
+
if (this.comparator === undefined) {
|
|
18
|
+
yield* [...this.iterable].sort();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
yield* [...this.iterable].sort(resolveInvokable(this.comparator));
|
|
17
22
|
}
|
|
18
23
|
}
|
|
19
24
|
//# sourceMappingURL=sort-iterable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/sort-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAmB,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"sort-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/sort-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAmB,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,YAAY;IAET;IACA;IAFZ,YACY,QAA0B,EAC1B,UAA+B;QAD/B,aAAQ,GAAR,QAAQ,CAAkB;QAC1B,eAAU,GAAV,UAAU,CAAqB;IACxC,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YAChC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;YACjC,OAAO;QACX,CAAC;QACD,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IACtE,CAAC;CACJ"}
|
package/dist/collection/implementations/iterable-collection/_shared/take-until-iterable.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
|
-
import { type
|
|
4
|
+
import { type PredicateInvokable, type ICollection } from "../../../../collection/contracts/_module-exports.js";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
8
|
export declare class TakeUntilIterable<TInput> implements Iterable<TInput> {
|
|
9
9
|
private collection;
|
|
10
10
|
private predicateFn;
|
|
11
|
-
constructor(collection: ICollection<TInput>, predicateFn:
|
|
11
|
+
constructor(collection: ICollection<TInput>, predicateFn: PredicateInvokable<TInput, ICollection<TInput>>);
|
|
12
12
|
[Symbol.iterator](): Iterator<TInput>;
|
|
13
13
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../collection/contracts/_module-exports.js";
|
|
5
|
+
import { resolveInvokable } from "../../../../utilities/_module-exports.js";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -14,7 +15,7 @@ export class TakeUntilIterable {
|
|
|
14
15
|
}
|
|
15
16
|
*[Symbol.iterator]() {
|
|
16
17
|
for (const [index, item] of this.collection.entries()) {
|
|
17
|
-
if (this.predicateFn(item, index, this.collection)) {
|
|
18
|
+
if (resolveInvokable(this.predicateFn)(item, index, this.collection)) {
|
|
18
19
|
break;
|
|
19
20
|
}
|
|
20
21
|
yield item;
|
package/dist/collection/implementations/iterable-collection/_shared/take-until-iterable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"take-until-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/take-until-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"take-until-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/take-until-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAEd;IACA;IAFZ,YACY,UAA+B,EAC/B,WAA4D;QAD5D,eAAU,GAAV,UAAU,CAAqB;QAC/B,gBAAW,GAAX,WAAW,CAAiD;IACrE,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,IACI,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,EAClE,CAAC;gBACC,MAAM;YACV,CAAC;YACD,MAAM,IAAI,CAAC;QACf,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../collection/contracts/_module-exports.js";
|
|
5
|
+
import { resolveInvokable } from "../../../../utilities/_module-exports.js";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -13,7 +14,7 @@ export class TapIterable {
|
|
|
13
14
|
this.callback = callback;
|
|
14
15
|
}
|
|
15
16
|
*[Symbol.iterator]() {
|
|
16
|
-
this.callback(this.collection);
|
|
17
|
+
resolveInvokable(this.callback)(this.collection);
|
|
17
18
|
yield* this.collection;
|
|
18
19
|
}
|
|
19
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tap-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/tap-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"tap-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/tap-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,WAAW;IAER;IACA;IAFZ,YACY,UAA+B,EAC/B,QAAkC;QADlC,eAAU,GAAV,UAAU,CAAqB;QAC/B,aAAQ,GAAR,QAAQ,CAA0B;IAC3C,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACjD,KAAK,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;CACJ"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../collection/contracts/_module-exports.js";
|
|
5
|
+
import { resolveInvokable } from "../../../../utilities/_module-exports.js";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -15,7 +16,7 @@ export class UniqueIterable {
|
|
|
15
16
|
*[Symbol.iterator]() {
|
|
16
17
|
const set = new Set([]);
|
|
17
18
|
for (const [index, item] of this.collection.entries()) {
|
|
18
|
-
const item_ = this.callback(item, index, this.collection);
|
|
19
|
+
const item_ = resolveInvokable(this.callback)(item, index, this.collection);
|
|
19
20
|
if (!set.has(item_)) {
|
|
20
21
|
yield item;
|
|
21
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unique-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/unique-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"unique-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/unique-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,cAAc;IAEX;IACA;IAFZ,YACY,UAA+B,EAC/B,WAAsD,CAAC,IAAI,EAAE,EAAE,CACnE,IAA0B;QAFtB,eAAU,GAAV,UAAU,CAAqB;QAC/B,aAAQ,GAAR,QAAQ,CACc;IAC/B,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,MAAM,GAAG,GAAG,IAAI,GAAG,CAAU,EAAE,CAAC,CAAC;QAEjC,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CACzC,IAAI,EACJ,KAAK,EACL,IAAI,CAAC,UAAU,CAClB,CAAC;YACF,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;gBAClB,MAAM,IAAI,CAAC;YACf,CAAC;YACD,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnB,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
|
-
import { type
|
|
4
|
+
import { type PredicateInvokable, type ICollection, type Map } from "../../../../collection/contracts/_module-exports.js";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
@@ -9,6 +9,6 @@ export declare class ChangeIterable<TInput, TFilterOutput extends TInput, TMapOu
|
|
|
9
9
|
private collection;
|
|
10
10
|
private predicateFn;
|
|
11
11
|
private mapFn;
|
|
12
|
-
constructor(collection: ICollection<TInput>, predicateFn:
|
|
12
|
+
constructor(collection: ICollection<TInput>, predicateFn: PredicateInvokable<TInput, ICollection<TInput>, TFilterOutput>, mapFn: Map<TFilterOutput, ICollection<TInput>, TMapOutput>);
|
|
13
13
|
[Symbol.iterator](): Iterator<TInput | TFilterOutput | TMapOutput>;
|
|
14
14
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../collection/contracts/_module-exports.js";
|
|
5
|
+
import { resolveInvokable } from "../../../../utilities/_module-exports.js";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -16,8 +17,8 @@ export class ChangeIterable {
|
|
|
16
17
|
}
|
|
17
18
|
*[Symbol.iterator]() {
|
|
18
19
|
for (const [index, item] of this.collection.entries()) {
|
|
19
|
-
if (this.predicateFn(item, index, this.collection)) {
|
|
20
|
-
yield this.mapFn(item, index, this.collection);
|
|
20
|
+
if (resolveInvokable(this.predicateFn)(item, index, this.collection)) {
|
|
21
|
+
yield resolveInvokable(this.mapFn)(item, index, this.collection);
|
|
21
22
|
}
|
|
22
23
|
else {
|
|
23
24
|
yield item;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/update-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAIN,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"update-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/update-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAIN,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,cAAc;IAIX;IACA;IAKA;IAPZ,YACY,UAA+B,EAC/B,WAIP,EACO,KAA0D;QAN1D,eAAU,GAAV,UAAU,CAAqB;QAC/B,gBAAW,GAAX,WAAW,CAIlB;QACO,UAAK,GAAL,KAAK,CAAqD;IACnE,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,IACI,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,EAClE,CAAC;gBACC,MAAM,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAC9B,IAAqB,EACrB,KAAK,EACL,IAAI,CAAC,UAAU,CAClB,CAAC;YACN,CAAC;iBAAM,CAAC;gBACJ,MAAM,IAAI,CAAC;YACf,CAAC;QACL,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import {} from "../../../../collection/contracts/_module-exports.js";
|
|
5
|
+
import { resolveInvokable } from "../../../../utilities/_module-exports.js";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -16,7 +17,7 @@ export class WhenIterable {
|
|
|
16
17
|
}
|
|
17
18
|
*[Symbol.iterator]() {
|
|
18
19
|
if (this.condition()) {
|
|
19
|
-
yield* this.callback(this.collection);
|
|
20
|
+
yield* resolveInvokable(this.callback)(this.collection);
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
22
23
|
yield* this.collection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"when-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/when-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"when-iterable.js","sourceRoot":"","sources":["../../../../../src/collection/implementations/iterable-collection/_shared/when-iterable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,YAAY;IAIT;IACA;IACA;IAHZ,YACY,UAA+B,EAC/B,SAAwB,EACxB,QAA+D;QAF/D,eAAU,GAAV,UAAU,CAAqB;QAC/B,cAAS,GAAT,SAAS,CAAe;QACxB,aAAQ,GAAR,QAAQ,CAAuD;IACxE,CAAC;IAEJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACd,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC;YACnB,KAAK,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACxD,OAAO;QACX,CAAC;QACD,KAAK,CAAC,CAAC,IAAI,CAAC,UAA6C,CAAC;IAC9D,CAAC;CACJ"}
|