@thi.ng/interceptors 3.1.4 → 3.1.7
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/CHANGELOG.md +1 -1
- package/README.md +1 -1
- package/interceptors.d.ts +5 -5
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
package/interceptors.d.ts
CHANGED
|
@@ -97,7 +97,7 @@ export declare const snapshot: (id?: string) => InterceptorFn;
|
|
|
97
97
|
* @param pred - predicate applied to given state & event
|
|
98
98
|
* @param err - interceptor triggered on predicate failure
|
|
99
99
|
*/
|
|
100
|
-
export declare const ensurePred: (pred: InterceptorPredicate, err?: InterceptorFn
|
|
100
|
+
export declare const ensurePred: (pred: InterceptorPredicate, err?: InterceptorFn) => InterceptorFn;
|
|
101
101
|
/**
|
|
102
102
|
* Specialization of {@link ensurePred} to ensure a state value is less than
|
|
103
103
|
* given max at the time when the event is being processed. The optional
|
|
@@ -117,7 +117,7 @@ export declare const ensurePred: (pred: InterceptorPredicate, err?: InterceptorF
|
|
|
117
117
|
* @param path - path extractor
|
|
118
118
|
* @param err - error interceptor
|
|
119
119
|
*/
|
|
120
|
-
export declare const ensureStateLessThan: (max: number, path?: Fn<Event, Path
|
|
120
|
+
export declare const ensureStateLessThan: (max: number, path?: Fn<Event, Path>, err?: InterceptorFn) => InterceptorFn;
|
|
121
121
|
/**
|
|
122
122
|
* Specialization of {@link ensurePred} to ensure a state value is greater
|
|
123
123
|
* than given min. See {@link ensureStateLessThan} for further details.
|
|
@@ -126,7 +126,7 @@ export declare const ensureStateLessThan: (max: number, path?: Fn<Event, Path> |
|
|
|
126
126
|
* @param path - path extractor
|
|
127
127
|
* @param err - error interceptor
|
|
128
128
|
*/
|
|
129
|
-
export declare const ensureStateGreaterThan: (min: number, path?: Fn<Event, Path
|
|
129
|
+
export declare const ensureStateGreaterThan: (min: number, path?: Fn<Event, Path>, err?: InterceptorFn) => InterceptorFn;
|
|
130
130
|
/**
|
|
131
131
|
* Specialization of {@link ensurePred} to ensure a state value is within
|
|
132
132
|
* given `min` / `max` closed interval. See {@link ensureStateLessThan} for
|
|
@@ -137,7 +137,7 @@ export declare const ensureStateGreaterThan: (min: number, path?: Fn<Event, Path
|
|
|
137
137
|
* @param path - path extractor
|
|
138
138
|
* @param err - error interceptor
|
|
139
139
|
*/
|
|
140
|
-
export declare const ensureStateRange: (min: number, max: number, path?: Fn<Event, Path
|
|
140
|
+
export declare const ensureStateRange: (min: number, max: number, path?: Fn<Event, Path>, err?: InterceptorFn) => InterceptorFn;
|
|
141
141
|
/**
|
|
142
142
|
* Specialization of {@link ensurePred} to ensure an event's payload value
|
|
143
143
|
* is within given `min` / `max` closed interval. By default, assumes
|
|
@@ -153,7 +153,7 @@ export declare const ensureStateRange: (min: number, max: number, path?: Fn<Even
|
|
|
153
153
|
* @param value - event value extractor
|
|
154
154
|
* @param err - error interceptor
|
|
155
155
|
*/
|
|
156
|
-
export declare const ensureParamRange: (min: number, max: number, value?: Fn<Event, number
|
|
156
|
+
export declare const ensureParamRange: (min: number, max: number, value?: Fn<Event, number>, err?: InterceptorFn) => InterceptorFn;
|
|
157
157
|
/**
|
|
158
158
|
* Higher-order interceptor. Returns new interceptor to set state value
|
|
159
159
|
* at provided path. This allows for dedicated events to set state
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/interceptors",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.7",
|
|
4
4
|
"description": "Interceptor based event bus, side effect & immutable state handling",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,20 +34,20 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.3.
|
|
38
|
-
"@thi.ng/atom": "^5.1.
|
|
39
|
-
"@thi.ng/checks": "^3.
|
|
40
|
-
"@thi.ng/errors": "^2.1.
|
|
41
|
-
"@thi.ng/logger": "^1.1.
|
|
42
|
-
"@thi.ng/paths": "^5.1.
|
|
37
|
+
"@thi.ng/api": "^8.3.7",
|
|
38
|
+
"@thi.ng/atom": "^5.1.7",
|
|
39
|
+
"@thi.ng/checks": "^3.2.0",
|
|
40
|
+
"@thi.ng/errors": "^2.1.7",
|
|
41
|
+
"@thi.ng/logger": "^1.1.7",
|
|
42
|
+
"@thi.ng/paths": "^5.1.7"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@microsoft/api-extractor": "^7.
|
|
46
|
-
"@thi.ng/testament": "^0.2.
|
|
45
|
+
"@microsoft/api-extractor": "^7.25.0",
|
|
46
|
+
"@thi.ng/testament": "^0.2.8",
|
|
47
47
|
"rimraf": "^3.0.2",
|
|
48
48
|
"tools": "^0.0.1",
|
|
49
|
-
"typedoc": "^0.22.
|
|
50
|
-
"typescript": "^4.
|
|
49
|
+
"typedoc": "^0.22.17",
|
|
50
|
+
"typescript": "^4.7.3"
|
|
51
51
|
},
|
|
52
52
|
"keywords": [
|
|
53
53
|
"async",
|
|
@@ -70,16 +70,16 @@
|
|
|
70
70
|
],
|
|
71
71
|
"exports": {
|
|
72
72
|
".": {
|
|
73
|
-
"
|
|
73
|
+
"default": "./index.js"
|
|
74
74
|
},
|
|
75
75
|
"./api": {
|
|
76
|
-
"
|
|
76
|
+
"default": "./api.js"
|
|
77
77
|
},
|
|
78
78
|
"./event-bus": {
|
|
79
|
-
"
|
|
79
|
+
"default": "./event-bus.js"
|
|
80
80
|
},
|
|
81
81
|
"./interceptors": {
|
|
82
|
-
"
|
|
82
|
+
"default": "./interceptors.js"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
"thi.ng": {
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"status": "deprecated",
|
|
92
92
|
"year": 2016
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "9e516d30a1a537e027a6b3d78bf9121bc5831d31\n"
|
|
95
95
|
}
|