@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-03-11T12:13:49Z
3
+ - **Last updated**: 2022-06-09T16:14:01Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/README.md CHANGED
@@ -150,7 +150,7 @@ node --experimental-repl-await
150
150
  > const interceptors = await import("@thi.ng/interceptors");
151
151
  ```
152
152
 
153
- Package sizes (gzipped, pre-treeshake): ESM: 2.23 KB
153
+ Package sizes (gzipped, pre-treeshake): ESM: 2.22 KB
154
154
 
155
155
  ## Dependencies
156
156
 
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 | undefined) => 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> | undefined, err?: InterceptorFn | undefined) => InterceptorFn;
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> | undefined, err?: InterceptorFn | undefined) => InterceptorFn;
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> | undefined, err?: InterceptorFn | undefined) => InterceptorFn;
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> | undefined, err?: InterceptorFn | undefined) => InterceptorFn;
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.4",
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.4",
38
- "@thi.ng/atom": "^5.1.4",
39
- "@thi.ng/checks": "^3.1.4",
40
- "@thi.ng/errors": "^2.1.4",
41
- "@thi.ng/logger": "^1.1.4",
42
- "@thi.ng/paths": "^5.1.4"
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.19.4",
46
- "@thi.ng/testament": "^0.2.4",
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.13",
50
- "typescript": "^4.6.2"
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
- "import": "./index.js"
73
+ "default": "./index.js"
74
74
  },
75
75
  "./api": {
76
- "import": "./api.js"
76
+ "default": "./api.js"
77
77
  },
78
78
  "./event-bus": {
79
- "import": "./event-bus.js"
79
+ "default": "./event-bus.js"
80
80
  },
81
81
  "./interceptors": {
82
- "import": "./interceptors.js"
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": "0fc692a3225c068aacafdc4cb6140cf603c67ad8\n"
94
+ "gitHead": "9e516d30a1a537e027a6b3d78bf9121bc5831d31\n"
95
95
  }