@thi.ng/rstream 7.2.1 → 7.2.4
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 +2 -2
- package/api.d.ts +6 -6
- package/debounce.d.ts +1 -1
- package/debounce.js +1 -1
- package/idgen.d.ts +2 -2
- package/idgen.js +2 -2
- package/nodejs.d.ts +7 -7
- package/nodejs.js +7 -7
- package/object.d.ts +3 -3
- package/object.js +2 -2
- package/package.json +51 -51
- package/sidechain-partition.d.ts +1 -2
- package/sidechain-partition.js +1 -2
- package/subscription.d.ts +2 -2
- package/subscription.js +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -201,7 +201,7 @@ node --experimental-repl-await
|
|
|
201
201
|
> const rstream = await import("@thi.ng/rstream");
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
Package sizes (gzipped, pre-treeshake): ESM: 6.
|
|
204
|
+
Package sizes (gzipped, pre-treeshake): ESM: 6.13 KB
|
|
205
205
|
|
|
206
206
|
## Dependencies
|
|
207
207
|
|
|
@@ -897,4 +897,4 @@ If this project contributes to an academic publication, please cite it as:
|
|
|
897
897
|
|
|
898
898
|
## License
|
|
899
899
|
|
|
900
|
-
© 2017 -
|
|
900
|
+
© 2017 - 2022 Karsten Schmidt // Apache Software License 2.0
|
package/api.d.ts
CHANGED
|
@@ -131,15 +131,15 @@ export interface ISubscribable<A> extends IDeref<A | undefined>, IID<string> {
|
|
|
131
131
|
/**
|
|
132
132
|
* Adds given `sub` as child subscription.
|
|
133
133
|
*
|
|
134
|
-
* @param sub
|
|
134
|
+
* @param sub -
|
|
135
135
|
*/
|
|
136
136
|
subscribe<B>(sub: ISubscription<A, B>): ISubscription<A, B>;
|
|
137
137
|
/**
|
|
138
138
|
* Wraps given partial `sub` in a {@link Subscription} and attaches it as
|
|
139
139
|
* child subscription.
|
|
140
140
|
*
|
|
141
|
-
* @param sub
|
|
142
|
-
* @param opts
|
|
141
|
+
* @param sub -
|
|
142
|
+
* @param opts -
|
|
143
143
|
*/
|
|
144
144
|
subscribe(sub: Partial<ISubscriber<A>>, opts?: Partial<CommonOpts>): ISubscription<A, A>;
|
|
145
145
|
/**
|
|
@@ -152,8 +152,8 @@ export interface ISubscribable<A> extends IDeref<A | undefined>, IID<string> {
|
|
|
152
152
|
*
|
|
153
153
|
* @see {@link ITransformable}
|
|
154
154
|
*
|
|
155
|
-
* @param sub
|
|
156
|
-
* @param opts
|
|
155
|
+
* @param sub -
|
|
156
|
+
* @param opts -
|
|
157
157
|
*/
|
|
158
158
|
subscribe<B>(sub: Partial<ISubscriber<B>>, opts?: Partial<TransformableOpts<A, B>>): ISubscription<A, B>;
|
|
159
159
|
/**
|
|
@@ -162,7 +162,7 @@ export interface ISubscribable<A> extends IDeref<A | undefined>, IID<string> {
|
|
|
162
162
|
* cascade of further unsubscriptions, depending on
|
|
163
163
|
* {@link CommonOpts.closeOut} settings of parent(s)).
|
|
164
164
|
*
|
|
165
|
-
* @param sub
|
|
165
|
+
* @param sub -
|
|
166
166
|
*/
|
|
167
167
|
unsubscribe(sub?: ISubscription<A, any>): boolean;
|
|
168
168
|
}
|
package/debounce.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { MetaStreamOpts } from "./metastream.js";
|
|
|
11
11
|
* // 3
|
|
12
12
|
* ```
|
|
13
13
|
*
|
|
14
|
-
* @param delay
|
|
14
|
+
* @param delay -
|
|
15
15
|
*/
|
|
16
16
|
export declare const debounce: <T>(delay: number, opts?: Partial<MetaStreamOpts> | undefined) => import("./metastream.js").MetaStream<T, T>;
|
|
17
17
|
//# sourceMappingURL=debounce.d.ts.map
|
package/debounce.js
CHANGED
package/idgen.d.ts
CHANGED
package/idgen.js
CHANGED
package/nodejs.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ import type { Subscription } from "./subscription.js";
|
|
|
8
8
|
* type `T`). If given, also connects `stderr` to new rstream's error handler.
|
|
9
9
|
* Unless `close` is false, the new stream closes once `stdout` is closed.
|
|
10
10
|
*
|
|
11
|
-
* @param stdout
|
|
12
|
-
* @param stderr
|
|
13
|
-
* @param close
|
|
11
|
+
* @param stdout -
|
|
12
|
+
* @param stderr -
|
|
13
|
+
* @param close -
|
|
14
14
|
*/
|
|
15
15
|
export declare const fromNodeJS: <T>(stdout: Readable, stderr?: Readable | undefined, close?: boolean) => Stream<T>;
|
|
16
16
|
/**
|
|
@@ -42,10 +42,10 @@ export declare const fromNodeJS: <T>(stdout: Readable, stderr?: Readable | undef
|
|
|
42
42
|
* // output done
|
|
43
43
|
* ```
|
|
44
44
|
*
|
|
45
|
-
* @param stdout
|
|
46
|
-
* @param stderr
|
|
47
|
-
* @param re
|
|
48
|
-
* @param close
|
|
45
|
+
* @param stdout -
|
|
46
|
+
* @param stderr -
|
|
47
|
+
* @param re -
|
|
48
|
+
* @param close -
|
|
49
49
|
*/
|
|
50
50
|
export declare const linesFromNodeJS: (stdout: Readable, stderr?: Readable | undefined, re?: RegExp | undefined, close?: boolean | undefined) => Subscription<string, string>;
|
|
51
51
|
//# sourceMappingURL=nodejs.d.ts.map
|
package/nodejs.js
CHANGED
|
@@ -6,9 +6,9 @@ import { stream } from "./stream.js";
|
|
|
6
6
|
* type `T`). If given, also connects `stderr` to new rstream's error handler.
|
|
7
7
|
* Unless `close` is false, the new stream closes once `stdout` is closed.
|
|
8
8
|
*
|
|
9
|
-
* @param stdout
|
|
10
|
-
* @param stderr
|
|
11
|
-
* @param close
|
|
9
|
+
* @param stdout -
|
|
10
|
+
* @param stderr -
|
|
11
|
+
* @param close -
|
|
12
12
|
*/
|
|
13
13
|
export const fromNodeJS = (stdout, stderr, close = true) => {
|
|
14
14
|
const ingest = stream();
|
|
@@ -46,9 +46,9 @@ export const fromNodeJS = (stdout, stderr, close = true) => {
|
|
|
46
46
|
* // output done
|
|
47
47
|
* ```
|
|
48
48
|
*
|
|
49
|
-
* @param stdout
|
|
50
|
-
* @param stderr
|
|
51
|
-
* @param re
|
|
52
|
-
* @param close
|
|
49
|
+
* @param stdout -
|
|
50
|
+
* @param stderr -
|
|
51
|
+
* @param re -
|
|
52
|
+
* @param close -
|
|
53
53
|
*/
|
|
54
54
|
export const linesFromNodeJS = (stdout, stderr, re, close) => (fromNodeJS(stdout, stderr, close).transform(rechunk(re)));
|
package/object.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface StreamObj<T, K extends Keys<T>> {
|
|
|
16
16
|
* Feeds new values from `x` to each registered key's stream.
|
|
17
17
|
* Satifies {@link ISubscriber.next} interface.
|
|
18
18
|
*
|
|
19
|
-
* @param x
|
|
19
|
+
* @param x -
|
|
20
20
|
*/
|
|
21
21
|
next(x: T): void;
|
|
22
22
|
/**
|
|
@@ -120,8 +120,8 @@ export interface StreamObjOpts<T, K extends Keys<T>> extends CommonOpts {
|
|
|
120
120
|
* // b foo
|
|
121
121
|
* ```
|
|
122
122
|
*
|
|
123
|
-
* @param src
|
|
124
|
-
* @param opts
|
|
123
|
+
* @param src -
|
|
124
|
+
* @param opts -
|
|
125
125
|
*/
|
|
126
126
|
export declare const fromObject: <T, K extends keyof T>(src: T, opts?: Partial<StreamObjOpts<T, K>>) => StreamObj<T, K>;
|
|
127
127
|
//# sourceMappingURL=object.d.ts.map
|
package/object.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/rstream",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.4",
|
|
4
4
|
"description": "Reactive streams & subscription primitives for constructing dataflow graphs / pipelines",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,22 +34,22 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.3.
|
|
38
|
-
"@thi.ng/arrays": "^2.1
|
|
39
|
-
"@thi.ng/associative": "^6.1.
|
|
40
|
-
"@thi.ng/atom": "^5.1.
|
|
41
|
-
"@thi.ng/checks": "^3.1.
|
|
42
|
-
"@thi.ng/errors": "^2.1.
|
|
43
|
-
"@thi.ng/logger": "^1.1.
|
|
44
|
-
"@thi.ng/transducers": "^8.1
|
|
37
|
+
"@thi.ng/api": "^8.3.5",
|
|
38
|
+
"@thi.ng/arrays": "^2.2.1",
|
|
39
|
+
"@thi.ng/associative": "^6.1.6",
|
|
40
|
+
"@thi.ng/atom": "^5.1.5",
|
|
41
|
+
"@thi.ng/checks": "^3.1.5",
|
|
42
|
+
"@thi.ng/errors": "^2.1.5",
|
|
43
|
+
"@thi.ng/logger": "^1.1.5",
|
|
44
|
+
"@thi.ng/transducers": "^8.3.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@microsoft/api-extractor": "^7.19.
|
|
48
|
-
"@thi.ng/testament": "^0.2.
|
|
47
|
+
"@microsoft/api-extractor": "^7.19.4",
|
|
48
|
+
"@thi.ng/testament": "^0.2.5",
|
|
49
49
|
"rimraf": "^3.0.2",
|
|
50
50
|
"tools": "^0.0.1",
|
|
51
|
-
"typedoc": "^0.22.
|
|
52
|
-
"typescript": "^4.
|
|
51
|
+
"typedoc": "^0.22.13",
|
|
52
|
+
"typescript": "^4.6.2"
|
|
53
53
|
},
|
|
54
54
|
"keywords": [
|
|
55
55
|
"async",
|
|
@@ -81,115 +81,115 @@
|
|
|
81
81
|
],
|
|
82
82
|
"exports": {
|
|
83
83
|
".": {
|
|
84
|
-
"
|
|
84
|
+
"default": "./index.js"
|
|
85
85
|
},
|
|
86
86
|
"./api": {
|
|
87
|
-
"
|
|
87
|
+
"default": "./api.js"
|
|
88
88
|
},
|
|
89
89
|
"./asidechain": {
|
|
90
|
-
"
|
|
90
|
+
"default": "./asidechain.js"
|
|
91
91
|
},
|
|
92
92
|
"./atom": {
|
|
93
|
-
"
|
|
93
|
+
"default": "./atom.js"
|
|
94
94
|
},
|
|
95
95
|
"./bisect": {
|
|
96
|
-
"
|
|
96
|
+
"default": "./bisect.js"
|
|
97
97
|
},
|
|
98
98
|
"./checks": {
|
|
99
|
-
"
|
|
99
|
+
"default": "./checks.js"
|
|
100
100
|
},
|
|
101
101
|
"./debounce": {
|
|
102
|
-
"
|
|
102
|
+
"default": "./debounce.js"
|
|
103
103
|
},
|
|
104
104
|
"./defworker": {
|
|
105
|
-
"
|
|
105
|
+
"default": "./defworker.js"
|
|
106
106
|
},
|
|
107
107
|
"./event": {
|
|
108
|
-
"
|
|
108
|
+
"default": "./event.js"
|
|
109
109
|
},
|
|
110
110
|
"./forkjoin": {
|
|
111
|
-
"
|
|
111
|
+
"default": "./forkjoin.js"
|
|
112
112
|
},
|
|
113
113
|
"./idgen": {
|
|
114
|
-
"
|
|
114
|
+
"default": "./idgen.js"
|
|
115
115
|
},
|
|
116
116
|
"./interval": {
|
|
117
|
-
"
|
|
117
|
+
"default": "./interval.js"
|
|
118
118
|
},
|
|
119
119
|
"./iterable": {
|
|
120
|
-
"
|
|
120
|
+
"default": "./iterable.js"
|
|
121
121
|
},
|
|
122
122
|
"./logger": {
|
|
123
|
-
"
|
|
123
|
+
"default": "./logger.js"
|
|
124
124
|
},
|
|
125
125
|
"./merge": {
|
|
126
|
-
"
|
|
126
|
+
"default": "./merge.js"
|
|
127
127
|
},
|
|
128
128
|
"./metastream": {
|
|
129
|
-
"
|
|
129
|
+
"default": "./metastream.js"
|
|
130
130
|
},
|
|
131
131
|
"./nodejs": {
|
|
132
|
-
"
|
|
132
|
+
"default": "./nodejs.js"
|
|
133
133
|
},
|
|
134
134
|
"./object": {
|
|
135
|
-
"
|
|
135
|
+
"default": "./object.js"
|
|
136
136
|
},
|
|
137
137
|
"./post-worker": {
|
|
138
|
-
"
|
|
138
|
+
"default": "./post-worker.js"
|
|
139
139
|
},
|
|
140
140
|
"./promise": {
|
|
141
|
-
"
|
|
141
|
+
"default": "./promise.js"
|
|
142
142
|
},
|
|
143
143
|
"./promises": {
|
|
144
|
-
"
|
|
144
|
+
"default": "./promises.js"
|
|
145
145
|
},
|
|
146
146
|
"./pubsub": {
|
|
147
|
-
"
|
|
147
|
+
"default": "./pubsub.js"
|
|
148
148
|
},
|
|
149
149
|
"./raf": {
|
|
150
|
-
"
|
|
150
|
+
"default": "./raf.js"
|
|
151
151
|
},
|
|
152
152
|
"./resolve": {
|
|
153
|
-
"
|
|
153
|
+
"default": "./resolve.js"
|
|
154
154
|
},
|
|
155
155
|
"./sidechain-partition": {
|
|
156
|
-
"
|
|
156
|
+
"default": "./sidechain-partition.js"
|
|
157
157
|
},
|
|
158
158
|
"./sidechain-toggle": {
|
|
159
|
-
"
|
|
159
|
+
"default": "./sidechain-toggle.js"
|
|
160
160
|
},
|
|
161
161
|
"./stream": {
|
|
162
|
-
"
|
|
162
|
+
"default": "./stream.js"
|
|
163
163
|
},
|
|
164
164
|
"./subscription": {
|
|
165
|
-
"
|
|
165
|
+
"default": "./subscription.js"
|
|
166
166
|
},
|
|
167
167
|
"./sync": {
|
|
168
|
-
"
|
|
168
|
+
"default": "./sync.js"
|
|
169
169
|
},
|
|
170
170
|
"./timeout": {
|
|
171
|
-
"
|
|
171
|
+
"default": "./timeout.js"
|
|
172
172
|
},
|
|
173
173
|
"./trace": {
|
|
174
|
-
"
|
|
174
|
+
"default": "./trace.js"
|
|
175
175
|
},
|
|
176
176
|
"./transduce": {
|
|
177
|
-
"
|
|
177
|
+
"default": "./transduce.js"
|
|
178
178
|
},
|
|
179
179
|
"./trigger": {
|
|
180
|
-
"
|
|
180
|
+
"default": "./trigger.js"
|
|
181
181
|
},
|
|
182
182
|
"./tunnel": {
|
|
183
|
-
"
|
|
183
|
+
"default": "./tunnel.js"
|
|
184
184
|
},
|
|
185
185
|
"./tween": {
|
|
186
|
-
"
|
|
186
|
+
"default": "./tween.js"
|
|
187
187
|
},
|
|
188
188
|
"./view": {
|
|
189
|
-
"
|
|
189
|
+
"default": "./view.js"
|
|
190
190
|
},
|
|
191
191
|
"./worker": {
|
|
192
|
-
"
|
|
192
|
+
"default": "./worker.js"
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
195
|
"thi.ng": {
|
|
@@ -201,5 +201,5 @@
|
|
|
201
201
|
],
|
|
202
202
|
"year": 2017
|
|
203
203
|
},
|
|
204
|
-
"gitHead": "
|
|
204
|
+
"gitHead": "5ee1feb590dd935593b1dd4e7f38a3ed3ba64765\n"
|
|
205
205
|
}
|
package/sidechain-partition.d.ts
CHANGED
|
@@ -40,8 +40,7 @@ export declare const sidechainPartition: <A, B>(side: ISubscribable<B>, opts?: P
|
|
|
40
40
|
* any present), passes only most recent one downstream *during* next RAF event
|
|
41
41
|
* processing.
|
|
42
42
|
*
|
|
43
|
-
* @param src
|
|
44
|
-
* @returns
|
|
43
|
+
* @param src -
|
|
45
44
|
*/
|
|
46
45
|
export declare const sidechainPartitionRAF: <T>(src: ISubscribable<T>) => import("./api.js").ISubscription<T[], T>;
|
|
47
46
|
export declare class SidechainPartition<T, S> extends ASidechain<T, S, T[]> {
|
package/sidechain-partition.js
CHANGED
|
@@ -39,8 +39,7 @@ export const sidechainPartition = (side, opts) => new SidechainPartition(side, o
|
|
|
39
39
|
* any present), passes only most recent one downstream *during* next RAF event
|
|
40
40
|
* processing.
|
|
41
41
|
*
|
|
42
|
-
* @param src
|
|
43
|
-
* @returns
|
|
42
|
+
* @param src -
|
|
44
43
|
*/
|
|
45
44
|
export const sidechainPartitionRAF = (src) => src
|
|
46
45
|
.subscribe(sidechainPartition(fromRAF()))
|
package/subscription.d.ts
CHANGED
|
@@ -93,8 +93,8 @@ export declare class Subscription<A, B> implements ISubscription<A, B> {
|
|
|
93
93
|
* single {@link @thi.ng/transducers#map} transducer only. The given
|
|
94
94
|
* function `fn` is used as `map`'s transformation fn.
|
|
95
95
|
*
|
|
96
|
-
* @param fn
|
|
97
|
-
* @param opts
|
|
96
|
+
* @param fn -
|
|
97
|
+
* @param opts -
|
|
98
98
|
*/
|
|
99
99
|
map<C>(fn: Fn<B, C>, opts?: Partial<WithErrorHandlerOpts>): ISubscription<B, C>;
|
|
100
100
|
unsubscribe(sub?: ISubscription<B, any>): boolean;
|
package/subscription.js
CHANGED
|
@@ -128,8 +128,8 @@ export class Subscription {
|
|
|
128
128
|
* single {@link @thi.ng/transducers#map} transducer only. The given
|
|
129
129
|
* function `fn` is used as `map`'s transformation fn.
|
|
130
130
|
*
|
|
131
|
-
* @param fn
|
|
132
|
-
* @param opts
|
|
131
|
+
* @param fn -
|
|
132
|
+
* @param opts -
|
|
133
133
|
*/
|
|
134
134
|
map(fn, opts) {
|
|
135
135
|
return this.transform(map(fn), opts || {});
|