@thi.ng/rstream 7.2.2 → 7.2.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/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 +14 -14
- 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.3",
|
|
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.
|
|
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.
|
|
37
|
+
"@thi.ng/api": "^8.3.4",
|
|
38
|
+
"@thi.ng/arrays": "^2.2.0",
|
|
39
|
+
"@thi.ng/associative": "^6.1.5",
|
|
40
|
+
"@thi.ng/atom": "^5.1.4",
|
|
41
|
+
"@thi.ng/checks": "^3.1.4",
|
|
42
|
+
"@thi.ng/errors": "^2.1.4",
|
|
43
|
+
"@thi.ng/logger": "^1.1.4",
|
|
44
|
+
"@thi.ng/transducers": "^8.3.0"
|
|
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.4",
|
|
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",
|
|
@@ -201,5 +201,5 @@
|
|
|
201
201
|
],
|
|
202
202
|
"year": 2017
|
|
203
203
|
},
|
|
204
|
-
"gitHead": "
|
|
204
|
+
"gitHead": "0fc692a3225c068aacafdc4cb6140cf603c67ad8\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 || {});
|