@dereekb/rxjs 13.11.1 → 13.11.3
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/index.cjs.js
CHANGED
|
@@ -680,6 +680,7 @@ function _unsupported_iterable_to_array$b(o, minLen) {
|
|
|
680
680
|
*
|
|
681
681
|
* @param isEqualFunction - equality check function to invert
|
|
682
682
|
* @returns a function that returns true when the value has been modified
|
|
683
|
+
* @__NO_SIDE_EFFECTS__
|
|
683
684
|
*/ function makeIsModifiedFunction(isEqualFunction) {
|
|
684
685
|
return function(value) {
|
|
685
686
|
return isEqualFunction(value).pipe(rxjs.map(function(x) {
|
|
@@ -695,6 +696,7 @@ function _unsupported_iterable_to_array$b(o, minLen) {
|
|
|
695
696
|
*
|
|
696
697
|
* @param config - configuration with isModified, isEqual, and/or defaultFunction
|
|
697
698
|
* @returns an observable of the resolved IsModifiedFunction
|
|
699
|
+
* @__NO_SIDE_EFFECTS__
|
|
698
700
|
*/ function makeIsModifiedFunctionObservable(config) {
|
|
699
701
|
var isModified = config.isModified, isEqual = config.isEqual, defaultFunction = config.defaultFunction;
|
|
700
702
|
return rxjs.combineLatest([
|
|
@@ -715,6 +717,7 @@ function _unsupported_iterable_to_array$b(o, minLen) {
|
|
|
715
717
|
* @param isCheckFunction - optional check function
|
|
716
718
|
* @param defaultValueOnMaybe - default result for null/undefined values
|
|
717
719
|
* @returns a function that evaluates each value against the check function and returns it or undefined
|
|
720
|
+
* @__NO_SIDE_EFFECTS__
|
|
718
721
|
*/ function makeReturnIfIsFunction(isCheckFunction, defaultValueOnMaybe) {
|
|
719
722
|
return function(value) {
|
|
720
723
|
return returnIfIs(isCheckFunction, value, defaultValueOnMaybe);
|
|
@@ -738,6 +741,7 @@ function _unsupported_iterable_to_array$b(o, minLen) {
|
|
|
738
741
|
* @param isCheckFunction - optional check function
|
|
739
742
|
* @param defaultValueOnMaybe - default result for null/undefined values
|
|
740
743
|
* @returns a function that evaluates each value against the check function and returns an observable boolean
|
|
744
|
+
* @__NO_SIDE_EFFECTS__
|
|
741
745
|
*/ function makeCheckIsFunction(isCheckFunction, defaultValueOnMaybe) {
|
|
742
746
|
return function(value) {
|
|
743
747
|
return checkIs(isCheckFunction, value, defaultValueOnMaybe);
|
|
@@ -1789,6 +1793,7 @@ var FilterMapItem = /*#__PURE__*/ function() {
|
|
|
1789
1793
|
* const result = resolve({ preset: 'active' });
|
|
1790
1794
|
* // result === { active: true }
|
|
1791
1795
|
* ```
|
|
1796
|
+
* @__NO_SIDE_EFFECTS__
|
|
1792
1797
|
*/ function makeMapFilterWithPresetFn(fn) {
|
|
1793
1798
|
return function(filter) {
|
|
1794
1799
|
if (filter.preset) {
|
|
@@ -2694,6 +2699,7 @@ function tapLog(messageOrFunction) {
|
|
|
2694
2699
|
* @param makeRandomDelay - factory that produces random delay values
|
|
2695
2700
|
* @param scheduler - the scheduler to use for the delay (defaults to asyncScheduler)
|
|
2696
2701
|
* @returns an operator that delays each emission
|
|
2702
|
+
* @__NO_SIDE_EFFECTS__
|
|
2697
2703
|
*/ function randomDelayWithRandomFunction(makeRandomDelay) {
|
|
2698
2704
|
var scheduler = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : rxjs.asyncScheduler;
|
|
2699
2705
|
return rxjs.delayWhen(function() {
|
|
@@ -3895,6 +3901,7 @@ function mapLoadingStateResults(input, config) {
|
|
|
3895
3901
|
*
|
|
3896
3902
|
* @param mapFn - function to transform the value and state into the output type
|
|
3897
3903
|
* @returns a function that accepts a loading state and returns the mapped value or undefined
|
|
3904
|
+
* @__NO_SIDE_EFFECTS__
|
|
3898
3905
|
*/ function mapLoadingStateValueFunction(mapFn) {
|
|
3899
3906
|
return function(state) {
|
|
3900
3907
|
var result;
|
|
@@ -6718,6 +6725,7 @@ function _define_property(obj, key, value) {
|
|
|
6718
6725
|
* @param config.work - the work function to execute for each input value
|
|
6719
6726
|
* @param config.delegate - delegate that receives lifecycle callbacks (start, success, reject)
|
|
6720
6727
|
* @returns a factory function that creates WorkInstance for each input
|
|
6728
|
+
* @__NO_SIDE_EFFECTS__
|
|
6721
6729
|
*/ function workFactory(param) {
|
|
6722
6730
|
var work = param.work, delegate = param.delegate;
|
|
6723
6731
|
return function(value) {
|
|
@@ -6745,6 +6753,7 @@ function _define_property(obj, key, value) {
|
|
|
6745
6753
|
*
|
|
6746
6754
|
* @param configFactory - factory that produces work configuration from the input value
|
|
6747
6755
|
* @returns a work factory with per-invocation configuration
|
|
6756
|
+
* @__NO_SIDE_EFFECTS__
|
|
6748
6757
|
*/ function workFactoryForConfigFactory(configFactory) {
|
|
6749
6758
|
return function(value) {
|
|
6750
6759
|
var config = configFactory(value);
|
package/index.esm.js
CHANGED
|
@@ -678,6 +678,7 @@ function _unsupported_iterable_to_array$b(o, minLen) {
|
|
|
678
678
|
*
|
|
679
679
|
* @param isEqualFunction - equality check function to invert
|
|
680
680
|
* @returns a function that returns true when the value has been modified
|
|
681
|
+
* @__NO_SIDE_EFFECTS__
|
|
681
682
|
*/ function makeIsModifiedFunction(isEqualFunction) {
|
|
682
683
|
return function(value) {
|
|
683
684
|
return isEqualFunction(value).pipe(map(function(x) {
|
|
@@ -693,6 +694,7 @@ function _unsupported_iterable_to_array$b(o, minLen) {
|
|
|
693
694
|
*
|
|
694
695
|
* @param config - configuration with isModified, isEqual, and/or defaultFunction
|
|
695
696
|
* @returns an observable of the resolved IsModifiedFunction
|
|
697
|
+
* @__NO_SIDE_EFFECTS__
|
|
696
698
|
*/ function makeIsModifiedFunctionObservable(config) {
|
|
697
699
|
var isModified = config.isModified, isEqual = config.isEqual, defaultFunction = config.defaultFunction;
|
|
698
700
|
return combineLatest([
|
|
@@ -713,6 +715,7 @@ function _unsupported_iterable_to_array$b(o, minLen) {
|
|
|
713
715
|
* @param isCheckFunction - optional check function
|
|
714
716
|
* @param defaultValueOnMaybe - default result for null/undefined values
|
|
715
717
|
* @returns a function that evaluates each value against the check function and returns it or undefined
|
|
718
|
+
* @__NO_SIDE_EFFECTS__
|
|
716
719
|
*/ function makeReturnIfIsFunction(isCheckFunction, defaultValueOnMaybe) {
|
|
717
720
|
return function(value) {
|
|
718
721
|
return returnIfIs(isCheckFunction, value, defaultValueOnMaybe);
|
|
@@ -736,6 +739,7 @@ function _unsupported_iterable_to_array$b(o, minLen) {
|
|
|
736
739
|
* @param isCheckFunction - optional check function
|
|
737
740
|
* @param defaultValueOnMaybe - default result for null/undefined values
|
|
738
741
|
* @returns a function that evaluates each value against the check function and returns an observable boolean
|
|
742
|
+
* @__NO_SIDE_EFFECTS__
|
|
739
743
|
*/ function makeCheckIsFunction(isCheckFunction, defaultValueOnMaybe) {
|
|
740
744
|
return function(value) {
|
|
741
745
|
return checkIs(isCheckFunction, value, defaultValueOnMaybe);
|
|
@@ -1787,6 +1791,7 @@ var FilterMapItem = /*#__PURE__*/ function() {
|
|
|
1787
1791
|
* const result = resolve({ preset: 'active' });
|
|
1788
1792
|
* // result === { active: true }
|
|
1789
1793
|
* ```
|
|
1794
|
+
* @__NO_SIDE_EFFECTS__
|
|
1790
1795
|
*/ function makeMapFilterWithPresetFn(fn) {
|
|
1791
1796
|
return function(filter) {
|
|
1792
1797
|
if (filter.preset) {
|
|
@@ -2692,6 +2697,7 @@ function tapLog(messageOrFunction) {
|
|
|
2692
2697
|
* @param makeRandomDelay - factory that produces random delay values
|
|
2693
2698
|
* @param scheduler - the scheduler to use for the delay (defaults to asyncScheduler)
|
|
2694
2699
|
* @returns an operator that delays each emission
|
|
2700
|
+
* @__NO_SIDE_EFFECTS__
|
|
2695
2701
|
*/ function randomDelayWithRandomFunction(makeRandomDelay) {
|
|
2696
2702
|
var scheduler = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : asyncScheduler;
|
|
2697
2703
|
return delayWhen(function() {
|
|
@@ -3893,6 +3899,7 @@ function mapLoadingStateResults(input, config) {
|
|
|
3893
3899
|
*
|
|
3894
3900
|
* @param mapFn - function to transform the value and state into the output type
|
|
3895
3901
|
* @returns a function that accepts a loading state and returns the mapped value or undefined
|
|
3902
|
+
* @__NO_SIDE_EFFECTS__
|
|
3896
3903
|
*/ function mapLoadingStateValueFunction(mapFn) {
|
|
3897
3904
|
return function(state) {
|
|
3898
3905
|
var result;
|
|
@@ -6716,6 +6723,7 @@ function _define_property(obj, key, value) {
|
|
|
6716
6723
|
* @param config.work - the work function to execute for each input value
|
|
6717
6724
|
* @param config.delegate - delegate that receives lifecycle callbacks (start, success, reject)
|
|
6718
6725
|
* @returns a factory function that creates WorkInstance for each input
|
|
6726
|
+
* @__NO_SIDE_EFFECTS__
|
|
6719
6727
|
*/ function workFactory(param) {
|
|
6720
6728
|
var work = param.work, delegate = param.delegate;
|
|
6721
6729
|
return function(value) {
|
|
@@ -6743,6 +6751,7 @@ function _define_property(obj, key, value) {
|
|
|
6743
6751
|
*
|
|
6744
6752
|
* @param configFactory - factory that produces work configuration from the input value
|
|
6745
6753
|
* @returns a work factory with per-invocation configuration
|
|
6754
|
+
* @__NO_SIDE_EFFECTS__
|
|
6746
6755
|
*/ function workFactoryForConfigFactory(configFactory) {
|
|
6747
6756
|
return function(value) {
|
|
6748
6757
|
var config = configFactory(value);
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/rxjs",
|
|
3
|
-
"version": "13.11.
|
|
3
|
+
"version": "13.11.3",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"rxjs": "^7.8.2",
|
|
7
|
-
"@dereekb/util": "13.11.
|
|
7
|
+
"@dereekb/util": "13.11.3"
|
|
8
8
|
},
|
|
9
9
|
"exports": {
|
|
10
10
|
"./package.json": "./package.json",
|
|
@@ -29,6 +29,7 @@ export type MapFilterWithPresetFn<F extends FilterWithPreset> = (filter: F) => F
|
|
|
29
29
|
* const result = resolve({ preset: 'active' });
|
|
30
30
|
* // result === { active: true }
|
|
31
31
|
* ```
|
|
32
|
+
* @__NO_SIDE_EFFECTS__
|
|
32
33
|
*/
|
|
33
34
|
export declare function makeMapFilterWithPresetFn<F extends FilterWithPreset>(fn: MapFilterWithPresetFn<F>): MapFilterWithPresetFn<F>;
|
|
34
35
|
/**
|
|
@@ -500,5 +500,6 @@ export type MapLoadingStateValueMapFunction<O, I, L extends LoadingState<I> = Lo
|
|
|
500
500
|
*
|
|
501
501
|
* @param mapFn - function to transform the value and state into the output type
|
|
502
502
|
* @returns a function that accepts a loading state and returns the mapped value or undefined
|
|
503
|
+
* @__NO_SIDE_EFFECTS__
|
|
503
504
|
*/
|
|
504
505
|
export declare function mapLoadingStateValueFunction<O, I, L extends LoadingState<I> = LoadingState<I>>(mapFn: MapLoadingStateValueMapFunction<O, I, L>): MapLoadingStateValueFunction<O, I, L>;
|
package/src/lib/rxjs/misc.d.ts
CHANGED
|
@@ -34,5 +34,6 @@ export declare function randomDelay<T = unknown>(maxOrArgs: number | RandomNumbe
|
|
|
34
34
|
* @param makeRandomDelay - factory that produces random delay values
|
|
35
35
|
* @param scheduler - the scheduler to use for the delay (defaults to asyncScheduler)
|
|
36
36
|
* @returns an operator that delays each emission
|
|
37
|
+
* @__NO_SIDE_EFFECTS__
|
|
37
38
|
*/
|
|
38
39
|
export declare function randomDelayWithRandomFunction<T = unknown>(makeRandomDelay: RandomNumberFactory, scheduler?: SchedulerLike): MonoTypeOperatorFunction<T>;
|
package/src/lib/rxjs/value.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export type IsModifiedFunction<T = unknown> = IsCheckFunction<T>;
|
|
|
23
23
|
*
|
|
24
24
|
* @param isEqualFunction - equality check function to invert
|
|
25
25
|
* @returns a function that returns true when the value has been modified
|
|
26
|
+
* @__NO_SIDE_EFFECTS__
|
|
26
27
|
*/
|
|
27
28
|
export declare function makeIsModifiedFunction<T>(isEqualFunction: IsEqualFunction<T>): IsModifiedFunction<T>;
|
|
28
29
|
/**
|
|
@@ -52,6 +53,7 @@ export interface MakeIsModifiedFunctionObservableConfig<T = unknown> {
|
|
|
52
53
|
*
|
|
53
54
|
* @param config - configuration with isModified, isEqual, and/or defaultFunction
|
|
54
55
|
* @returns an observable of the resolved IsModifiedFunction
|
|
56
|
+
* @__NO_SIDE_EFFECTS__
|
|
55
57
|
*/
|
|
56
58
|
export declare function makeIsModifiedFunctionObservable<T>(config: MakeIsModifiedFunctionObservableConfig<T>): Observable<IsModifiedFunction<T>>;
|
|
57
59
|
/**
|
|
@@ -60,6 +62,7 @@ export declare function makeIsModifiedFunctionObservable<T>(config: MakeIsModifi
|
|
|
60
62
|
* @param isCheckFunction - optional check function
|
|
61
63
|
* @param defaultValueOnMaybe - default result for null/undefined values
|
|
62
64
|
* @returns a function that evaluates each value against the check function and returns it or undefined
|
|
65
|
+
* @__NO_SIDE_EFFECTS__
|
|
63
66
|
*/
|
|
64
67
|
export declare function makeReturnIfIsFunction<T>(isCheckFunction: Maybe<IsModifiedFunction<T>>, defaultValueOnMaybe?: boolean): (value: Maybe<T>) => Observable<Maybe<T>>;
|
|
65
68
|
/**
|
|
@@ -77,6 +80,7 @@ export declare function returnIfIs<T>(isCheckFunction: Maybe<IsModifiedFunction<
|
|
|
77
80
|
* @param isCheckFunction - optional check function
|
|
78
81
|
* @param defaultValueOnMaybe - default result for null/undefined values
|
|
79
82
|
* @returns a function that evaluates each value against the check function and returns an observable boolean
|
|
83
|
+
* @__NO_SIDE_EFFECTS__
|
|
80
84
|
*/
|
|
81
85
|
export declare function makeCheckIsFunction<T>(isCheckFunction: Maybe<IsModifiedFunction<T>>, defaultValueOnMaybe?: boolean): (value: Maybe<T>) => Observable<boolean>;
|
|
82
86
|
/**
|
|
@@ -55,6 +55,7 @@ export interface WorkFactoryConfig<T, O> {
|
|
|
55
55
|
* @param config.work - the work function to execute for each input value
|
|
56
56
|
* @param config.delegate - delegate that receives lifecycle callbacks (start, success, reject)
|
|
57
57
|
* @returns a factory function that creates WorkInstance for each input
|
|
58
|
+
* @__NO_SIDE_EFFECTS__
|
|
58
59
|
*/
|
|
59
60
|
export declare function workFactory<T, O>({ work, delegate }: WorkFactoryConfig<T, O>): WorkFactory<T, O>;
|
|
60
61
|
/**
|
|
@@ -68,5 +69,6 @@ export type WorkFactoryConfigFactory<T, O> = FactoryWithRequiredInput<WorkFactor
|
|
|
68
69
|
*
|
|
69
70
|
* @param configFactory - factory that produces work configuration from the input value
|
|
70
71
|
* @returns a work factory with per-invocation configuration
|
|
72
|
+
* @__NO_SIDE_EFFECTS__
|
|
71
73
|
*/
|
|
72
74
|
export declare function workFactoryForConfigFactory<T, O>(configFactory: WorkFactoryConfigFactory<T, O>): WorkFactory<T, O>;
|