@thi.ng/rstream 7.0.0 → 7.0.1
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 +8 -0
- package/README.md +3 -2
- package/api.d.ts +1 -1
- package/asidechain.d.ts +2 -2
- package/asidechain.js +1 -1
- package/atom.d.ts +2 -2
- package/atom.js +2 -2
- package/bisect.d.ts +2 -2
- package/bisect.js +2 -2
- package/checks.d.ts +1 -1
- package/checks.js +1 -1
- package/debounce.d.ts +2 -2
- package/debounce.js +3 -3
- package/event.d.ts +2 -2
- package/event.js +2 -2
- package/forkjoin.d.ts +2 -2
- package/forkjoin.js +2 -2
- package/idgen.d.ts +1 -1
- package/index.d.ts +35 -35
- package/index.js +35 -35
- package/interval.d.ts +2 -2
- package/interval.js +3 -3
- package/iterable.d.ts +3 -3
- package/iterable.js +3 -3
- package/merge.d.ts +2 -2
- package/merge.js +5 -5
- package/metastream.d.ts +2 -2
- package/metastream.js +3 -3
- package/object.d.ts +2 -2
- package/object.js +2 -2
- package/package.json +14 -11
- package/post-worker.d.ts +1 -1
- package/post-worker.js +2 -2
- package/promise.d.ts +2 -2
- package/promise.js +3 -3
- package/promises.d.ts +1 -1
- package/promises.js +2 -2
- package/pubsub.d.ts +2 -2
- package/pubsub.js +4 -4
- package/raf.d.ts +2 -2
- package/raf.js +3 -3
- package/resolve.d.ts +1 -1
- package/resolve.js +4 -4
- package/sidechain-partition.d.ts +4 -4
- package/sidechain-partition.js +4 -4
- package/sidechain-toggle.d.ts +3 -3
- package/sidechain-toggle.js +3 -3
- package/stream.d.ts +2 -2
- package/stream.js +4 -4
- package/subscription.d.ts +1 -1
- package/subscription.js +3 -3
- package/sync.d.ts +2 -2
- package/sync.js +5 -5
- package/timeout.d.ts +2 -2
- package/timeout.js +3 -3
- package/trace.d.ts +1 -1
- package/transduce.d.ts +1 -1
- package/trigger.d.ts +2 -2
- package/trigger.js +2 -2
- package/tunnel.d.ts +1 -1
- package/tunnel.js +5 -5
- package/tween.d.ts +5 -5
- package/tween.js +4 -4
- package/view.d.ts +2 -2
- package/view.js +2 -2
- package/worker.d.ts +2 -2
- package/worker.js +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [7.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream@7.0.0...@thi.ng/rstream@7.0.1) (2021-10-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @thi.ng/rstream
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [7.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream@6.0.21...@thi.ng/rstream@7.0.0) (2021-10-12)
|
|
7
15
|
|
|
8
16
|
|
package/README.md
CHANGED
|
@@ -192,10 +192,11 @@ ES module import:
|
|
|
192
192
|
|
|
193
193
|
[Skypack documentation](https://docs.skypack.dev/)
|
|
194
194
|
|
|
195
|
-
For
|
|
195
|
+
For Node.js REPL:
|
|
196
196
|
|
|
197
197
|
```text
|
|
198
|
-
|
|
198
|
+
# with flag only for < v16
|
|
199
|
+
node --experimental-repl-await
|
|
199
200
|
|
|
200
201
|
> const rstream = await import("@thi.ng/rstream");
|
|
201
202
|
```
|
package/api.d.ts
CHANGED
package/asidechain.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CommonOpts, ISubscription } from "./api";
|
|
2
|
-
import { Subscription } from "./subscription";
|
|
1
|
+
import type { CommonOpts, ISubscription } from "./api.js";
|
|
2
|
+
import { Subscription } from "./subscription.js";
|
|
3
3
|
/**
|
|
4
4
|
* Abstract base class for sidechained subscription types (e.g.
|
|
5
5
|
* {@link sidechainPartition}, {@link sidechainToggle}).
|
package/asidechain.js
CHANGED
package/atom.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Predicate2 } from "@thi.ng/api";
|
|
2
2
|
import type { ReadonlyAtom } from "@thi.ng/atom";
|
|
3
|
-
import type { CommonOpts } from "./api";
|
|
3
|
+
import type { CommonOpts } from "./api.js";
|
|
4
4
|
export interface FromAtomOpts<T> extends CommonOpts {
|
|
5
5
|
/**
|
|
6
6
|
* True, if the current atom value should be emitted when the stream
|
|
@@ -48,5 +48,5 @@ export interface FromAtomOpts<T> extends CommonOpts {
|
|
|
48
48
|
* @param atom -
|
|
49
49
|
* @param opts -
|
|
50
50
|
*/
|
|
51
|
-
export declare const fromAtom: <T>(atom: ReadonlyAtom<T>, opts?: Partial<FromAtomOpts<T>> | undefined) => import("./stream").Stream<T>;
|
|
51
|
+
export declare const fromAtom: <T>(atom: ReadonlyAtom<T>, opts?: Partial<FromAtomOpts<T>> | undefined) => import("./stream.js").Stream<T>;
|
|
52
52
|
//# sourceMappingURL=atom.d.ts.map
|
package/atom.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __optsWithID } from "./idgen";
|
|
2
|
-
import { stream } from "./stream";
|
|
1
|
+
import { __optsWithID } from "./idgen.js";
|
|
2
|
+
import { stream } from "./stream.js";
|
|
3
3
|
/**
|
|
4
4
|
* Yields {@link Stream} of value changes in given
|
|
5
5
|
* {@link @thi.ng/atom# | Atom-like state container}.
|
package/bisect.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Predicate } from "@thi.ng/api";
|
|
2
|
-
import type { ISubscriber } from "./api";
|
|
3
|
-
import { PubSub } from "./pubsub";
|
|
2
|
+
import type { ISubscriber } from "./api.js";
|
|
3
|
+
import { PubSub } from "./pubsub.js";
|
|
4
4
|
/**
|
|
5
5
|
* Returns a {@link PubSub} using given predicate `pred` as boolean
|
|
6
6
|
* {@link PubSubOpts.topic | topic function} and `truthy` & `falsey` as
|
package/bisect.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __nextID } from "./idgen";
|
|
2
|
-
import { PubSub } from "./pubsub";
|
|
1
|
+
import { __nextID } from "./idgen.js";
|
|
2
|
+
import { PubSub } from "./pubsub.js";
|
|
3
3
|
/**
|
|
4
4
|
* Returns a {@link PubSub} using given predicate `pred` as boolean
|
|
5
5
|
* {@link PubSubOpts.topic | topic function} and `truthy` & `falsey` as
|
package/checks.d.ts
CHANGED
package/checks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { implementsFunction } from "@thi.ng/checks/implements-function";
|
|
2
|
-
import { CloseMode } from "./api";
|
|
2
|
+
import { CloseMode } from "./api.js";
|
|
3
3
|
export const isSubscribable = (x) => implementsFunction(x, "subscribe");
|
|
4
4
|
/**
|
|
5
5
|
* Returns true if mode is FIRST, or if mode is LAST *and* `num = 0`.
|
package/debounce.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MetaStreamOpts } from "./metastream";
|
|
1
|
+
import { MetaStreamOpts } from "./metastream.js";
|
|
2
2
|
/**
|
|
3
3
|
* Returns a subscription which buffers any intermediate inputs arriving faster
|
|
4
4
|
* than given `delay` time period, then emits last received value after `delay`
|
|
@@ -13,5 +13,5 @@ import { MetaStreamOpts } from "./metastream";
|
|
|
13
13
|
*
|
|
14
14
|
* @param delay
|
|
15
15
|
*/
|
|
16
|
-
export declare const debounce: <T>(delay: number, opts?: Partial<MetaStreamOpts> | undefined) => import("./metastream").MetaStream<T, T>;
|
|
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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { __optsWithID } from "./idgen";
|
|
2
|
-
import { fromIterable } from "./iterable";
|
|
3
|
-
import { metaStream } from "./metastream";
|
|
1
|
+
import { __optsWithID } from "./idgen.js";
|
|
2
|
+
import { fromIterable } from "./iterable.js";
|
|
3
|
+
import { metaStream } from "./metastream.js";
|
|
4
4
|
/**
|
|
5
5
|
* Returns a subscription which buffers any intermediate inputs arriving faster
|
|
6
6
|
* than given `delay` time period, then emits last received value after `delay`
|
package/event.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CommonOpts } from "./api";
|
|
2
|
-
import { Stream } from "./stream";
|
|
1
|
+
import type { CommonOpts } from "./api.js";
|
|
2
|
+
import { Stream } from "./stream.js";
|
|
3
3
|
/**
|
|
4
4
|
* Creates a {@link Stream} of events attached to given element / event
|
|
5
5
|
* target and using given event listener options (same as supported by
|
package/event.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __optsWithID } from "./idgen";
|
|
2
|
-
import { stream } from "./stream";
|
|
1
|
+
import { __optsWithID } from "./idgen.js";
|
|
2
|
+
import { stream } from "./stream.js";
|
|
3
3
|
/**
|
|
4
4
|
* Creates a {@link Stream} of events attached to given element / event
|
|
5
5
|
* target and using given event listener options (same as supported by
|
package/forkjoin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ArrayLikeIterable, Fn, Fn3 } from "@thi.ng/api";
|
|
2
|
-
import type { CommonOpts, ITransformable } from "./api";
|
|
3
|
-
import type { Subscription } from "./subscription";
|
|
2
|
+
import type { CommonOpts, ITransformable } from "./api.js";
|
|
3
|
+
import type { Subscription } from "./subscription.js";
|
|
4
4
|
export interface ForkJoinOpts<IN, MSG, RES, OUT> extends Partial<CommonOpts> {
|
|
5
5
|
/**
|
|
6
6
|
* Input stream to attach to obtain work items from.
|
package/forkjoin.js
CHANGED
|
@@ -4,8 +4,8 @@ import { map } from "@thi.ng/transducers/map";
|
|
|
4
4
|
import { mapcat } from "@thi.ng/transducers/mapcat";
|
|
5
5
|
import { range } from "@thi.ng/transducers/range";
|
|
6
6
|
import { transduce } from "@thi.ng/transducers/transduce";
|
|
7
|
-
import { sync } from "./sync";
|
|
8
|
-
import { tunnel } from "./tunnel";
|
|
7
|
+
import { sync } from "./sync.js";
|
|
8
|
+
import { tunnel } from "./tunnel.js";
|
|
9
9
|
/**
|
|
10
10
|
* Returns a {@link StreamSync} instance which creates & attaches
|
|
11
11
|
* multiple subscriptions to given `src` input stream, processes each
|
package/idgen.d.ts
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
export * from "./api";
|
|
2
|
-
export * from "./asidechain";
|
|
3
|
-
export * from "./atom";
|
|
4
|
-
export * from "./bisect";
|
|
5
|
-
export * from "./checks";
|
|
6
|
-
export * from "./debounce";
|
|
7
|
-
export * from "./defworker";
|
|
8
|
-
export * from "./event";
|
|
9
|
-
export * from "./forkjoin";
|
|
10
|
-
export * from "./idgen";
|
|
11
|
-
export * from "./interval";
|
|
12
|
-
export * from "./iterable";
|
|
13
|
-
export * from "./logger";
|
|
14
|
-
export * from "./merge";
|
|
15
|
-
export * from "./metastream";
|
|
16
|
-
export * from "./object";
|
|
17
|
-
export * from "./post-worker";
|
|
18
|
-
export * from "./promise";
|
|
19
|
-
export * from "./promises";
|
|
20
|
-
export * from "./pubsub";
|
|
21
|
-
export * from "./raf";
|
|
22
|
-
export * from "./resolve";
|
|
23
|
-
export * from "./sidechain-partition";
|
|
24
|
-
export * from "./sidechain-toggle";
|
|
25
|
-
export * from "./stream";
|
|
26
|
-
export * from "./subscription";
|
|
27
|
-
export * from "./sync";
|
|
28
|
-
export * from "./timeout";
|
|
29
|
-
export * from "./trace";
|
|
30
|
-
export * from "./transduce";
|
|
31
|
-
export * from "./trigger";
|
|
32
|
-
export * from "./tunnel";
|
|
33
|
-
export * from "./tween";
|
|
34
|
-
export * from "./view";
|
|
35
|
-
export * from "./worker";
|
|
1
|
+
export * from "./api.js";
|
|
2
|
+
export * from "./asidechain.js";
|
|
3
|
+
export * from "./atom.js";
|
|
4
|
+
export * from "./bisect.js";
|
|
5
|
+
export * from "./checks.js";
|
|
6
|
+
export * from "./debounce.js";
|
|
7
|
+
export * from "./defworker.js";
|
|
8
|
+
export * from "./event.js";
|
|
9
|
+
export * from "./forkjoin.js";
|
|
10
|
+
export * from "./idgen.js";
|
|
11
|
+
export * from "./interval.js";
|
|
12
|
+
export * from "./iterable.js";
|
|
13
|
+
export * from "./logger.js";
|
|
14
|
+
export * from "./merge.js";
|
|
15
|
+
export * from "./metastream.js";
|
|
16
|
+
export * from "./object.js";
|
|
17
|
+
export * from "./post-worker.js";
|
|
18
|
+
export * from "./promise.js";
|
|
19
|
+
export * from "./promises.js";
|
|
20
|
+
export * from "./pubsub.js";
|
|
21
|
+
export * from "./raf.js";
|
|
22
|
+
export * from "./resolve.js";
|
|
23
|
+
export * from "./sidechain-partition.js";
|
|
24
|
+
export * from "./sidechain-toggle.js";
|
|
25
|
+
export * from "./stream.js";
|
|
26
|
+
export * from "./subscription.js";
|
|
27
|
+
export * from "./sync.js";
|
|
28
|
+
export * from "./timeout.js";
|
|
29
|
+
export * from "./trace.js";
|
|
30
|
+
export * from "./transduce.js";
|
|
31
|
+
export * from "./trigger.js";
|
|
32
|
+
export * from "./tunnel.js";
|
|
33
|
+
export * from "./tween.js";
|
|
34
|
+
export * from "./view.js";
|
|
35
|
+
export * from "./worker.js";
|
|
36
36
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
export * from "./api";
|
|
2
|
-
export * from "./asidechain";
|
|
3
|
-
export * from "./atom";
|
|
4
|
-
export * from "./bisect";
|
|
5
|
-
export * from "./checks";
|
|
6
|
-
export * from "./debounce";
|
|
7
|
-
export * from "./defworker";
|
|
8
|
-
export * from "./event";
|
|
9
|
-
export * from "./forkjoin";
|
|
10
|
-
export * from "./idgen";
|
|
11
|
-
export * from "./interval";
|
|
12
|
-
export * from "./iterable";
|
|
13
|
-
export * from "./logger";
|
|
14
|
-
export * from "./merge";
|
|
15
|
-
export * from "./metastream";
|
|
16
|
-
export * from "./object";
|
|
17
|
-
export * from "./post-worker";
|
|
18
|
-
export * from "./promise";
|
|
19
|
-
export * from "./promises";
|
|
20
|
-
export * from "./pubsub";
|
|
21
|
-
export * from "./raf";
|
|
22
|
-
export * from "./resolve";
|
|
23
|
-
export * from "./sidechain-partition";
|
|
24
|
-
export * from "./sidechain-toggle";
|
|
25
|
-
export * from "./stream";
|
|
26
|
-
export * from "./subscription";
|
|
27
|
-
export * from "./sync";
|
|
28
|
-
export * from "./timeout";
|
|
29
|
-
export * from "./trace";
|
|
30
|
-
export * from "./transduce";
|
|
31
|
-
export * from "./trigger";
|
|
32
|
-
export * from "./tunnel";
|
|
33
|
-
export * from "./tween";
|
|
34
|
-
export * from "./view";
|
|
35
|
-
export * from "./worker";
|
|
1
|
+
export * from "./api.js";
|
|
2
|
+
export * from "./asidechain.js";
|
|
3
|
+
export * from "./atom.js";
|
|
4
|
+
export * from "./bisect.js";
|
|
5
|
+
export * from "./checks.js";
|
|
6
|
+
export * from "./debounce.js";
|
|
7
|
+
export * from "./defworker.js";
|
|
8
|
+
export * from "./event.js";
|
|
9
|
+
export * from "./forkjoin.js";
|
|
10
|
+
export * from "./idgen.js";
|
|
11
|
+
export * from "./interval.js";
|
|
12
|
+
export * from "./iterable.js";
|
|
13
|
+
export * from "./logger.js";
|
|
14
|
+
export * from "./merge.js";
|
|
15
|
+
export * from "./metastream.js";
|
|
16
|
+
export * from "./object.js";
|
|
17
|
+
export * from "./post-worker.js";
|
|
18
|
+
export * from "./promise.js";
|
|
19
|
+
export * from "./promises.js";
|
|
20
|
+
export * from "./pubsub.js";
|
|
21
|
+
export * from "./raf.js";
|
|
22
|
+
export * from "./resolve.js";
|
|
23
|
+
export * from "./sidechain-partition.js";
|
|
24
|
+
export * from "./sidechain-toggle.js";
|
|
25
|
+
export * from "./stream.js";
|
|
26
|
+
export * from "./subscription.js";
|
|
27
|
+
export * from "./sync.js";
|
|
28
|
+
export * from "./timeout.js";
|
|
29
|
+
export * from "./trace.js";
|
|
30
|
+
export * from "./transduce.js";
|
|
31
|
+
export * from "./trigger.js";
|
|
32
|
+
export * from "./tunnel.js";
|
|
33
|
+
export * from "./tween.js";
|
|
34
|
+
export * from "./view.js";
|
|
35
|
+
export * from "./worker.js";
|
package/interval.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommonOpts } from "./api";
|
|
1
|
+
import { CommonOpts } from "./api.js";
|
|
2
2
|
export interface FromIntervalOpts extends CommonOpts {
|
|
3
3
|
/**
|
|
4
4
|
* If given, only the stated number of values will be emitted (in
|
|
@@ -20,5 +20,5 @@ export interface FromIntervalOpts extends CommonOpts {
|
|
|
20
20
|
* @param delay -
|
|
21
21
|
* @param opts -
|
|
22
22
|
*/
|
|
23
|
-
export declare const fromInterval: (delay: number, opts?: Partial<FromIntervalOpts> | undefined) => import("./stream").Stream<number>;
|
|
23
|
+
export declare const fromInterval: (delay: number, opts?: Partial<FromIntervalOpts> | undefined) => import("./stream.js").Stream<number>;
|
|
24
24
|
//# sourceMappingURL=interval.d.ts.map
|
package/interval.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CloseMode } from "./api";
|
|
2
|
-
import { __optsWithID } from "./idgen";
|
|
3
|
-
import { stream } from "./stream";
|
|
1
|
+
import { CloseMode } from "./api.js";
|
|
2
|
+
import { __optsWithID } from "./idgen.js";
|
|
3
|
+
import { stream } from "./stream.js";
|
|
4
4
|
/**
|
|
5
5
|
* Returns a {@link Stream} of monotonically increasing counter values,
|
|
6
6
|
* emitted at given `delay` interval and up to the optionally defined
|
package/iterable.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommonOpts } from "./api";
|
|
1
|
+
import { CommonOpts } from "./api.js";
|
|
2
2
|
export interface FromIterableOpts extends CommonOpts {
|
|
3
3
|
/**
|
|
4
4
|
* Time delay (in ms) between emitted values. The default value of
|
|
@@ -23,7 +23,7 @@ export interface FromIterableOpts extends CommonOpts {
|
|
|
23
23
|
* @param src -
|
|
24
24
|
* @param opts -
|
|
25
25
|
*/
|
|
26
|
-
export declare const fromIterable: <T>(src: Iterable<T>, opts?: Partial<FromIterableOpts>) => import("./stream").Stream<T>;
|
|
26
|
+
export declare const fromIterable: <T>(src: Iterable<T>, opts?: Partial<FromIterableOpts>) => import("./stream.js").Stream<T>;
|
|
27
27
|
/**
|
|
28
28
|
* Creates a new {@link Stream} of given iterable which synchronously calls
|
|
29
29
|
* `.next()` for each item of the iterable when the first (and in this
|
|
@@ -34,5 +34,5 @@ export declare const fromIterable: <T>(src: Iterable<T>, opts?: Partial<FromIter
|
|
|
34
34
|
* @param src -
|
|
35
35
|
* @param opts -
|
|
36
36
|
*/
|
|
37
|
-
export declare const fromIterableSync: <T>(src: Iterable<T>, opts?: Partial<CommonOpts> | undefined) => import("./stream").Stream<T>;
|
|
37
|
+
export declare const fromIterableSync: <T>(src: Iterable<T>, opts?: Partial<CommonOpts> | undefined) => import("./stream.js").Stream<T>;
|
|
38
38
|
//# sourceMappingURL=iterable.d.ts.map
|
package/iterable.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CloseMode } from "./api";
|
|
2
|
-
import { __optsWithID } from "./idgen";
|
|
3
|
-
import { stream } from "./stream";
|
|
1
|
+
import { CloseMode } from "./api.js";
|
|
2
|
+
import { __optsWithID } from "./idgen.js";
|
|
3
|
+
import { stream } from "./stream.js";
|
|
4
4
|
/**
|
|
5
5
|
* Returns a {@link Stream} of values from provided iterable, emitted at
|
|
6
6
|
* the given `delay` interval.
|
package/merge.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ISubscribable, ISubscription, TransformableOpts } from "./api";
|
|
2
|
-
import { Subscription } from "./subscription";
|
|
1
|
+
import { ISubscribable, ISubscription, TransformableOpts } from "./api.js";
|
|
2
|
+
import { Subscription } from "./subscription.js";
|
|
3
3
|
export interface StreamMergeOpts<A, B> extends TransformableOpts<A, B> {
|
|
4
4
|
/**
|
|
5
5
|
* Input sources.
|
package/merge.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { State } from "./api";
|
|
2
|
-
import { isFirstOrLastInput } from "./checks";
|
|
3
|
-
import { __optsWithID } from "./idgen";
|
|
4
|
-
import { __removeAllIDs } from "./internal/remove";
|
|
5
|
-
import { Subscription } from "./subscription";
|
|
1
|
+
import { State, } from "./api.js";
|
|
2
|
+
import { isFirstOrLastInput } from "./checks.js";
|
|
3
|
+
import { __optsWithID } from "./idgen.js";
|
|
4
|
+
import { __removeAllIDs } from "./internal/remove.js";
|
|
5
|
+
import { Subscription } from "./subscription.js";
|
|
6
6
|
/**
|
|
7
7
|
* Returns a new {@link StreamMerge} subscription, consuming values from
|
|
8
8
|
* multiple inputs and passing received values on to any subscribers.
|
package/metastream.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Fn, Nullable } from "@thi.ng/api";
|
|
2
|
-
import { CommonOpts, ISubscription } from "./api";
|
|
3
|
-
import { Subscription } from "./subscription";
|
|
2
|
+
import { CommonOpts, ISubscription } from "./api.js";
|
|
3
|
+
import { Subscription } from "./subscription.js";
|
|
4
4
|
export interface MetaStreamOpts extends CommonOpts {
|
|
5
5
|
/**
|
|
6
6
|
* If true, emits the last received value from the metastream's
|
package/metastream.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { assert } from "@thi.ng/errors/assert";
|
|
2
|
-
import { CloseMode, State } from "./api";
|
|
3
|
-
import { __optsWithID } from "./idgen";
|
|
4
|
-
import { Subscription } from "./subscription";
|
|
2
|
+
import { CloseMode, State } from "./api.js";
|
|
3
|
+
import { __optsWithID } from "./idgen.js";
|
|
4
|
+
import { Subscription } from "./subscription.js";
|
|
5
5
|
/**
|
|
6
6
|
* Returns a {@link Subscription} which transforms each incoming value into a
|
|
7
7
|
* new {@link ISubscription}, subscribes to it (via an hidden / internal
|
package/object.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Keys, Predicate2 } from "@thi.ng/api";
|
|
2
|
-
import type { CommonOpts } from "./api";
|
|
3
|
-
import { Subscription } from "./subscription";
|
|
2
|
+
import type { CommonOpts } from "./api.js";
|
|
3
|
+
import { Subscription } from "./subscription.js";
|
|
4
4
|
export declare type KeyStreams<T, K extends Keys<T>> = {
|
|
5
5
|
[id in K]-?: Subscription<T[id], T[id]>;
|
|
6
6
|
};
|
package/object.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { dedupe } from "@thi.ng/transducers/dedupe";
|
|
2
|
-
import { __nextID } from "./idgen";
|
|
3
|
-
import { subscription } from "./subscription";
|
|
2
|
+
import { __nextID } from "./idgen.js";
|
|
3
|
+
import { subscription } from "./subscription.js";
|
|
4
4
|
/**
|
|
5
5
|
* Takes an arbitrary object `src` and object of options (see
|
|
6
6
|
* {@link StreamObjOpts}). Creates a new object and for each selected
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/rstream",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "Reactive streams & subscription primitives for constructing dataflow graphs / pipelines",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.0.
|
|
38
|
-
"@thi.ng/arrays": "^2.0.
|
|
39
|
-
"@thi.ng/associative": "^6.0.
|
|
40
|
-
"@thi.ng/atom": "^5.0.
|
|
41
|
-
"@thi.ng/checks": "^3.0.
|
|
42
|
-
"@thi.ng/errors": "^2.0.
|
|
43
|
-
"@thi.ng/logger": "^0.1
|
|
44
|
-
"@thi.ng/transducers": "^8.0.
|
|
37
|
+
"@thi.ng/api": "^8.0.1",
|
|
38
|
+
"@thi.ng/arrays": "^2.0.1",
|
|
39
|
+
"@thi.ng/associative": "^6.0.1",
|
|
40
|
+
"@thi.ng/atom": "^5.0.1",
|
|
41
|
+
"@thi.ng/checks": "^3.0.1",
|
|
42
|
+
"@thi.ng/errors": "^2.0.1",
|
|
43
|
+
"@thi.ng/logger": "^1.0.1",
|
|
44
|
+
"@thi.ng/transducers": "^8.0.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@thi.ng/testament": "^0.1.
|
|
47
|
+
"@thi.ng/testament": "^0.1.1"
|
|
48
48
|
},
|
|
49
49
|
"keywords": [
|
|
50
50
|
"async",
|
|
@@ -66,6 +66,9 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
+
"engines": {
|
|
70
|
+
"node": ">=12.7"
|
|
71
|
+
},
|
|
69
72
|
"files": [
|
|
70
73
|
"*.js",
|
|
71
74
|
"*.d.ts",
|
|
@@ -190,5 +193,5 @@
|
|
|
190
193
|
],
|
|
191
194
|
"year": 2017
|
|
192
195
|
},
|
|
193
|
-
"gitHead": "
|
|
196
|
+
"gitHead": "2e6b3d7c0f4c5686c1e9bdb4902ed7d3f90bcc19"
|
|
194
197
|
}
|
package/post-worker.d.ts
CHANGED
package/post-worker.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isTransferable } from "@thi.ng/checks/is-transferable";
|
|
2
2
|
import { isTypedArray } from "@thi.ng/checks/is-typedarray";
|
|
3
|
-
import { LOGGER } from "./logger";
|
|
4
|
-
import { defWorker } from "./defworker";
|
|
3
|
+
import { LOGGER } from "./logger.js";
|
|
4
|
+
import { defWorker } from "./defworker.js";
|
|
5
5
|
/**
|
|
6
6
|
* Creates a {@link ISubscriber | subscriber} which forwards received
|
|
7
7
|
* values to given worker.
|
package/promise.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WithErrorHandlerOpts } from "./api";
|
|
1
|
+
import { WithErrorHandlerOpts } from "./api.js";
|
|
2
2
|
/**
|
|
3
3
|
* Yields a single-value {@link Stream} of the resolved promise and then
|
|
4
4
|
* automatically marks itself done.
|
|
@@ -10,5 +10,5 @@ import { WithErrorHandlerOpts } from "./api";
|
|
|
10
10
|
* @param src -
|
|
11
11
|
* @param opts -
|
|
12
12
|
*/
|
|
13
|
-
export declare const fromPromise: <T>(src: Promise<T>, opts?: Partial<WithErrorHandlerOpts> | undefined) => import("./stream").Stream<T>;
|
|
13
|
+
export declare const fromPromise: <T>(src: Promise<T>, opts?: Partial<WithErrorHandlerOpts> | undefined) => import("./stream.js").Stream<T>;
|
|
14
14
|
//# sourceMappingURL=promise.d.ts.map
|
package/promise.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CloseMode, State } from "./api";
|
|
2
|
-
import { __optsWithID } from "./idgen";
|
|
3
|
-
import { stream } from "./stream";
|
|
1
|
+
import { CloseMode, State } from "./api.js";
|
|
2
|
+
import { __optsWithID } from "./idgen.js";
|
|
3
|
+
import { stream } from "./stream.js";
|
|
4
4
|
/**
|
|
5
5
|
* Yields a single-value {@link Stream} of the resolved promise and then
|
|
6
6
|
* automatically marks itself done.
|
package/promises.d.ts
CHANGED
package/promises.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mapcat } from "@thi.ng/transducers/mapcat";
|
|
2
|
-
import { __optsWithID } from "./idgen";
|
|
3
|
-
import { fromPromise } from "./promise";
|
|
2
|
+
import { __optsWithID } from "./idgen.js";
|
|
3
|
+
import { fromPromise } from "./promise.js";
|
|
4
4
|
/**
|
|
5
5
|
* Wraps given iterable in `Promise.all()` to yield {@link Stream} of
|
|
6
6
|
* results in same order as arguments, then closes.
|
package/pubsub.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Fn, Predicate2 } from "@thi.ng/api";
|
|
2
2
|
import { EquivMap } from "@thi.ng/associative/equiv-map";
|
|
3
3
|
import type { Transducer } from "@thi.ng/transducers";
|
|
4
|
-
import { ISubscriber, ISubscription, TransformableOpts, WithErrorHandlerOpts } from "./api";
|
|
5
|
-
import { Subscription } from "./subscription";
|
|
4
|
+
import { ISubscriber, ISubscription, TransformableOpts, WithErrorHandlerOpts } from "./api.js";
|
|
5
|
+
import { Subscription } from "./subscription.js";
|
|
6
6
|
export interface PubSubOpts<A, B, T> {
|
|
7
7
|
/**
|
|
8
8
|
* Topic function. Incoming values will be routed to topic
|
package/pubsub.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { EquivMap } from "@thi.ng/associative/equiv-map";
|
|
2
2
|
import { unsupported } from "@thi.ng/errors/unsupported";
|
|
3
|
-
import { CloseMode, } from "./api";
|
|
4
|
-
import { __optsWithID } from "./idgen";
|
|
5
|
-
import { LOGGER } from "./logger";
|
|
6
|
-
import { Subscription, subscription } from "./subscription";
|
|
3
|
+
import { CloseMode, } from "./api.js";
|
|
4
|
+
import { __optsWithID } from "./idgen.js";
|
|
5
|
+
import { LOGGER } from "./logger.js";
|
|
6
|
+
import { Subscription, subscription } from "./subscription.js";
|
|
7
7
|
/**
|
|
8
8
|
* Topic based stream splitter. Applies `topic` function to each received value
|
|
9
9
|
* and only forwards it to the child subscriptions of the returned topic.
|
package/raf.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CommonOpts } from "./api";
|
|
1
|
+
import type { CommonOpts } from "./api.js";
|
|
2
2
|
/**
|
|
3
3
|
* Yields {@link Stream} of a monotonically increasing counter,
|
|
4
4
|
* triggered by a `requestAnimationFrame()` loop (only available in
|
|
@@ -11,5 +11,5 @@ import type { CommonOpts } from "./api";
|
|
|
11
11
|
* All subscribers to this stream will be processed during that same
|
|
12
12
|
* loop iteration.
|
|
13
13
|
*/
|
|
14
|
-
export declare const fromRAF: (opts?: Partial<CommonOpts> | undefined) => import("./stream").Stream<number>;
|
|
14
|
+
export declare const fromRAF: (opts?: Partial<CommonOpts> | undefined) => import("./stream.js").Stream<number>;
|
|
15
15
|
//# sourceMappingURL=raf.d.ts.map
|
package/raf.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isNode } from "@thi.ng/checks/is-node";
|
|
2
|
-
import { __optsWithID } from "./idgen";
|
|
3
|
-
import { fromInterval } from "./interval";
|
|
4
|
-
import { stream } from "./stream";
|
|
2
|
+
import { __optsWithID } from "./idgen.js";
|
|
3
|
+
import { fromInterval } from "./interval.js";
|
|
4
|
+
import { stream } from "./stream.js";
|
|
5
5
|
/**
|
|
6
6
|
* Yields {@link Stream} of a monotonically increasing counter,
|
|
7
7
|
* triggered by a `requestAnimationFrame()` loop (only available in
|
package/resolve.d.ts
CHANGED
package/resolve.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { State } from "./api";
|
|
2
|
-
import { __optsWithID } from "./idgen";
|
|
3
|
-
import { LOGGER } from "./logger";
|
|
4
|
-
import { Subscription } from "./subscription";
|
|
1
|
+
import { State } from "./api.js";
|
|
2
|
+
import { __optsWithID } from "./idgen.js";
|
|
3
|
+
import { LOGGER } from "./logger.js";
|
|
4
|
+
import { Subscription } from "./subscription.js";
|
|
5
5
|
/**
|
|
6
6
|
* Creates a {@link Subscription} which receives promises, buffers them
|
|
7
7
|
* and then passes their resolved values downstream.
|
package/sidechain-partition.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Predicate } from "@thi.ng/api";
|
|
2
|
-
import { CommonOpts, ISubscribable } from "./api";
|
|
3
|
-
import { ASidechain } from "./asidechain";
|
|
4
|
-
import type { Subscription } from "./subscription";
|
|
2
|
+
import { CommonOpts, ISubscribable } from "./api.js";
|
|
3
|
+
import { ASidechain } from "./asidechain.js";
|
|
4
|
+
import type { Subscription } from "./subscription.js";
|
|
5
5
|
export interface SidechainPartitionOpts<T> extends CommonOpts {
|
|
6
6
|
pred: Predicate<T>;
|
|
7
7
|
}
|
|
@@ -43,7 +43,7 @@ export declare const sidechainPartition: <A, B>(side: ISubscribable<B>, opts?: P
|
|
|
43
43
|
* @param src
|
|
44
44
|
* @returns
|
|
45
45
|
*/
|
|
46
|
-
export declare const sidechainPartitionRAF: <T>(src: ISubscribable<T>) => import("./api").ISubscription<T[], T>;
|
|
46
|
+
export declare const sidechainPartitionRAF: <T>(src: ISubscribable<T>) => import("./api.js").ISubscription<T[], T>;
|
|
47
47
|
export declare class SidechainPartition<T, S> extends ASidechain<T, S, T[]> {
|
|
48
48
|
buf: T[];
|
|
49
49
|
constructor(side: ISubscribable<S>, opts?: Partial<SidechainPartitionOpts<S>>);
|
package/sidechain-partition.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { peek } from "@thi.ng/arrays/peek";
|
|
2
2
|
import { map } from "@thi.ng/transducers/map";
|
|
3
|
-
import { State } from "./api";
|
|
4
|
-
import { ASidechain } from "./asidechain";
|
|
5
|
-
import { __optsWithID } from "./idgen";
|
|
6
|
-
import { fromRAF } from "./raf";
|
|
3
|
+
import { State } from "./api.js";
|
|
4
|
+
import { ASidechain } from "./asidechain.js";
|
|
5
|
+
import { __optsWithID } from "./idgen.js";
|
|
6
|
+
import { fromRAF } from "./raf.js";
|
|
7
7
|
/**
|
|
8
8
|
* Returns a {@link Subscription} which buffers values from `src` until
|
|
9
9
|
* side chain fires, then emits buffer (unless empty) and repeats
|
package/sidechain-toggle.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Predicate } from "@thi.ng/api";
|
|
2
|
-
import { CommonOpts, ISubscribable } from "./api";
|
|
3
|
-
import { ASidechain } from "./asidechain";
|
|
4
|
-
import type { Subscription } from "./subscription";
|
|
2
|
+
import { CommonOpts, ISubscribable } from "./api.js";
|
|
3
|
+
import { ASidechain } from "./asidechain.js";
|
|
4
|
+
import type { Subscription } from "./subscription.js";
|
|
5
5
|
export interface SidechainToggleOpts<T> extends CommonOpts {
|
|
6
6
|
pred: Predicate<T>;
|
|
7
7
|
initial: boolean;
|
package/sidechain-toggle.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { State } from "./api";
|
|
2
|
-
import { ASidechain } from "./asidechain";
|
|
3
|
-
import { __optsWithID } from "./idgen";
|
|
1
|
+
import { State } from "./api.js";
|
|
2
|
+
import { ASidechain } from "./asidechain.js";
|
|
3
|
+
import { __optsWithID } from "./idgen.js";
|
|
4
4
|
/**
|
|
5
5
|
* Returns {@link Subscription} which filters values from input based on
|
|
6
6
|
* values received from side chain.
|
package/stream.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CommonOpts, IStream, ISubscriber, ISubscription, StreamCancel, StreamSource, TransformableOpts, WithErrorHandlerOpts } from "./api";
|
|
2
|
-
import { Subscription } from "./subscription";
|
|
1
|
+
import { CommonOpts, IStream, ISubscriber, ISubscription, StreamCancel, StreamSource, TransformableOpts, WithErrorHandlerOpts } from "./api.js";
|
|
2
|
+
import { Subscription } from "./subscription.js";
|
|
3
3
|
/**
|
|
4
4
|
* Creates a new {@link Stream} instance, optionally with given
|
|
5
5
|
* `StreamSource` function and / or options.
|
package/stream.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isFunction } from "@thi.ng/checks/is-function";
|
|
2
|
-
import { CloseMode, } from "./api";
|
|
3
|
-
import { __optsWithID } from "./idgen";
|
|
4
|
-
import { LOGGER } from "./logger";
|
|
5
|
-
import { Subscription } from "./subscription";
|
|
2
|
+
import { CloseMode, } from "./api.js";
|
|
3
|
+
import { __optsWithID } from "./idgen.js";
|
|
4
|
+
import { LOGGER } from "./logger.js";
|
|
5
|
+
import { Subscription } from "./subscription.js";
|
|
6
6
|
export function stream(src, opts) {
|
|
7
7
|
return new Stream(src, opts);
|
|
8
8
|
}
|
package/subscription.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Fn } from "@thi.ng/api";
|
|
2
2
|
import type { Reducer, Transducer } from "@thi.ng/transducers";
|
|
3
3
|
import { Reduced } from "@thi.ng/transducers/reduced";
|
|
4
|
-
import { CloseMode, CommonOpts, ISubscriber, ISubscription, State, SubscriptionOpts, TransformableOpts, WithErrorHandlerOpts, WithTransform } from "./api";
|
|
4
|
+
import { CloseMode, CommonOpts, ISubscriber, ISubscription, State, SubscriptionOpts, TransformableOpts, WithErrorHandlerOpts, WithTransform } from "./api.js";
|
|
5
5
|
/**
|
|
6
6
|
* Creates a new {@link Subscription} instance, the fundamental datatype
|
|
7
7
|
* and building block provided by this package.
|
package/subscription.js
CHANGED
|
@@ -8,9 +8,9 @@ import { comp } from "@thi.ng/transducers/comp";
|
|
|
8
8
|
import { map } from "@thi.ng/transducers/map";
|
|
9
9
|
import { push } from "@thi.ng/transducers/push";
|
|
10
10
|
import { isReduced, unreduced } from "@thi.ng/transducers/reduced";
|
|
11
|
-
import { CloseMode, State, } from "./api";
|
|
12
|
-
import { __optsWithID } from "./idgen";
|
|
13
|
-
import { LOGGER } from "./logger";
|
|
11
|
+
import { CloseMode, State, } from "./api.js";
|
|
12
|
+
import { __optsWithID } from "./idgen.js";
|
|
13
|
+
import { LOGGER } from "./logger.js";
|
|
14
14
|
/**
|
|
15
15
|
* Creates a new {@link Subscription} instance, the fundamental datatype
|
|
16
16
|
* and building block provided by this package.
|
package/sync.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Always, Derefed, IObjectOf } from "@thi.ng/api";
|
|
2
2
|
import { PartitionSync } from "@thi.ng/transducers/partition-sync";
|
|
3
|
-
import type { ISubscribable, ISubscription, TransformableOpts } from "./api";
|
|
4
|
-
import { Subscription } from "./subscription";
|
|
3
|
+
import type { ISubscribable, ISubscription, TransformableOpts } from "./api.js";
|
|
4
|
+
import { Subscription } from "./subscription.js";
|
|
5
5
|
export declare type SyncTuple<T extends IObjectOf<ISubscribable<any>>> = {
|
|
6
6
|
[id in keyof T]: Always<Derefed<T[id]>>;
|
|
7
7
|
};
|
package/sync.js
CHANGED
|
@@ -2,11 +2,11 @@ import { comp } from "@thi.ng/transducers/comp";
|
|
|
2
2
|
import { labeled } from "@thi.ng/transducers/labeled";
|
|
3
3
|
import { mapVals } from "@thi.ng/transducers/map-vals";
|
|
4
4
|
import { partitionSync, } from "@thi.ng/transducers/partition-sync";
|
|
5
|
-
import { isFirstOrLastInput } from "./checks";
|
|
6
|
-
import { __optsWithID } from "./idgen";
|
|
7
|
-
import { __removeAllIDs } from "./internal/remove";
|
|
8
|
-
import { LOGGER } from "./logger";
|
|
9
|
-
import { Subscription } from "./subscription";
|
|
5
|
+
import { isFirstOrLastInput } from "./checks.js";
|
|
6
|
+
import { __optsWithID } from "./idgen.js";
|
|
7
|
+
import { __removeAllIDs } from "./internal/remove.js";
|
|
8
|
+
import { LOGGER } from "./logger.js";
|
|
9
|
+
import { Subscription } from "./subscription.js";
|
|
10
10
|
/**
|
|
11
11
|
* Similar to {@link StreamMerge}, but with extra synchronization of inputs.
|
|
12
12
|
* Before emitting any new values, {@link StreamSync} collects values until at
|
package/timeout.d.ts
CHANGED
package/timeout.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { State } from "./api";
|
|
2
|
-
import { __optsWithID } from "./idgen";
|
|
3
|
-
import { Subscription } from "./subscription";
|
|
1
|
+
import { State } from "./api.js";
|
|
2
|
+
import { __optsWithID } from "./idgen.js";
|
|
3
|
+
import { Subscription } from "./subscription.js";
|
|
4
4
|
/**
|
|
5
5
|
* Returns a {@link Subscription} that calls the
|
|
6
6
|
* {@link ISubscriber.error} handlers of all child subscriptions with an
|
package/trace.d.ts
CHANGED
package/transduce.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Reducer, Transducer } from "@thi.ng/transducers";
|
|
2
|
-
import type { Subscription } from "./subscription";
|
|
2
|
+
import type { Subscription } from "./subscription.js";
|
|
3
3
|
/**
|
|
4
4
|
* Returns a promise which subscribes to given input and transforms
|
|
5
5
|
* incoming values using given transducer `xform` and reducer `rfn`.
|
package/trigger.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CommonOpts } from "./api";
|
|
2
|
-
import type { Stream } from "./stream";
|
|
1
|
+
import type { CommonOpts } from "./api.js";
|
|
2
|
+
import type { Stream } from "./stream.js";
|
|
3
3
|
/**
|
|
4
4
|
* Utility stream. Returns a new stream which emits a single value `x` (if
|
|
5
5
|
* given) and then closes. If no arg is provided, the stream emits a single
|
package/trigger.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __optsWithID } from "./idgen";
|
|
2
|
-
import { fromIterableSync } from "./iterable";
|
|
1
|
+
import { __optsWithID } from "./idgen.js";
|
|
2
|
+
import { fromIterableSync } from "./iterable.js";
|
|
3
3
|
export function trigger(x = true, opts) {
|
|
4
4
|
return fromIterableSync([x], __optsWithID("trigger", opts));
|
|
5
5
|
}
|
package/tunnel.d.ts
CHANGED
package/tunnel.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { State } from "./api";
|
|
2
|
-
import { __nextID } from "./idgen";
|
|
3
|
-
import { LOGGER } from "./logger";
|
|
4
|
-
import { Subscription } from "./subscription";
|
|
5
|
-
import { defWorker } from "./defworker";
|
|
1
|
+
import { State } from "./api.js";
|
|
2
|
+
import { __nextID } from "./idgen.js";
|
|
3
|
+
import { LOGGER } from "./logger.js";
|
|
4
|
+
import { Subscription } from "./subscription.js";
|
|
5
|
+
import { defWorker } from "./defworker.js";
|
|
6
6
|
/**
|
|
7
7
|
* Returns a {@link Subscription} which processes received values via
|
|
8
8
|
* the configured worker(s) and then passes values received back from
|
package/tween.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Fn2 } from "@thi.ng/api";
|
|
2
|
-
import { ISubscribable } from "./api";
|
|
2
|
+
import { ISubscribable } from "./api.js";
|
|
3
3
|
/**
|
|
4
4
|
* Takes an existing stream/subscription `src` and attaches new
|
|
5
5
|
* subscription which interpolates between incoming values from `src`
|
|
@@ -54,9 +54,9 @@ import { ISubscribable } from "./api";
|
|
|
54
54
|
* @param stop -
|
|
55
55
|
* @param clock -
|
|
56
56
|
*/
|
|
57
|
-
export declare const tween: <T>(src: ISubscribable<T>, initial: T, mix: Fn2<T, T, T>, stop?: Fn2<T, T, boolean> | undefined, clock?: number | ISubscribable<any> | undefined) => import("./api").ISubscription<import("./sync").SyncTuple<{
|
|
57
|
+
export declare const tween: <T>(src: ISubscribable<T>, initial: T, mix: Fn2<T, T, T>, stop?: Fn2<T, T, boolean> | undefined, clock?: number | ISubscribable<any> | undefined) => import("./api.js").ISubscription<import("./sync.js").SyncTuple<{
|
|
58
58
|
src: ISubscribable<T>;
|
|
59
|
-
_: ISubscribable<any> | import("./stream").Stream<number>;
|
|
59
|
+
_: ISubscribable<any> | import("./stream.js").Stream<number>;
|
|
60
60
|
}>, T>;
|
|
61
61
|
/**
|
|
62
62
|
* Convenience version of {@link tween} for its most common use case, tweening
|
|
@@ -68,8 +68,8 @@ export declare const tween: <T>(src: ISubscribable<T>, initial: T, mix: Fn2<T, T
|
|
|
68
68
|
* @param eps -
|
|
69
69
|
* @param clock -
|
|
70
70
|
*/
|
|
71
|
-
export declare const tweenNumber: (src: ISubscribable<number>, init?: number, speed?: number, eps?: number, clock?: number | ISubscribable<any> | undefined) => import("./api").ISubscription<import("./sync").SyncTuple<{
|
|
71
|
+
export declare const tweenNumber: (src: ISubscribable<number>, init?: number, speed?: number, eps?: number, clock?: number | ISubscribable<any> | undefined) => import("./api.js").ISubscription<import("./sync.js").SyncTuple<{
|
|
72
72
|
src: ISubscribable<number>;
|
|
73
|
-
_: ISubscribable<any> | import("./stream").Stream<number>;
|
|
73
|
+
_: ISubscribable<any> | import("./stream.js").Stream<number>;
|
|
74
74
|
}>, number>;
|
|
75
75
|
//# sourceMappingURL=tween.d.ts.map
|
package/tween.js
CHANGED
|
@@ -2,10 +2,10 @@ import { isNumber } from "@thi.ng/checks/is-number";
|
|
|
2
2
|
import { dedupe } from "@thi.ng/transducers/dedupe";
|
|
3
3
|
import { reducer } from "@thi.ng/transducers/reduce";
|
|
4
4
|
import { scan } from "@thi.ng/transducers/scan";
|
|
5
|
-
import { CloseMode } from "./api";
|
|
6
|
-
import { fromInterval } from "./interval";
|
|
7
|
-
import { fromRAF } from "./raf";
|
|
8
|
-
import { sync } from "./sync";
|
|
5
|
+
import { CloseMode } from "./api.js";
|
|
6
|
+
import { fromInterval } from "./interval.js";
|
|
7
|
+
import { fromRAF } from "./raf.js";
|
|
8
|
+
import { sync } from "./sync.js";
|
|
9
9
|
/**
|
|
10
10
|
* Takes an existing stream/subscription `src` and attaches new
|
|
11
11
|
* subscription which interpolates between incoming values from `src`
|
package/view.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DeepPath, Fn, OptPathVal, Path, Path0, Path1, Path2, Path3, Path4, Path5, Path6, Path7, Path8, Predicate2 } from "@thi.ng/api";
|
|
2
2
|
import type { ReadonlyAtom } from "@thi.ng/atom";
|
|
3
|
-
import type { CommonOpts } from "./api";
|
|
4
|
-
import { Stream } from "./stream";
|
|
3
|
+
import type { CommonOpts } from "./api.js";
|
|
4
|
+
import { Stream } from "./stream.js";
|
|
5
5
|
export interface FromViewOpts<P, A, B> extends Partial<CommonOpts> {
|
|
6
6
|
path: P;
|
|
7
7
|
tx?: Fn<A, B>;
|
package/view.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { View } from "@thi.ng/atom/view";
|
|
2
|
-
import { __optsWithID } from "./idgen";
|
|
3
|
-
import { Stream } from "./stream";
|
|
2
|
+
import { __optsWithID } from "./idgen.js";
|
|
3
|
+
import { Stream } from "./stream.js";
|
|
4
4
|
/**
|
|
5
5
|
* Unchecked version of {@link fromView}. Paths can be given as string
|
|
6
6
|
* or tuple.
|
package/worker.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WithErrorHandlerOpts } from "./api";
|
|
1
|
+
import type { WithErrorHandlerOpts } from "./api.js";
|
|
2
2
|
export interface FromWorkerOpts extends WithErrorHandlerOpts {
|
|
3
3
|
/**
|
|
4
4
|
* If true, the worker will be terminated when the stream
|
|
@@ -31,5 +31,5 @@ export interface FromWorkerOpts extends WithErrorHandlerOpts {
|
|
|
31
31
|
* @param worker -
|
|
32
32
|
* @param opts -
|
|
33
33
|
*/
|
|
34
|
-
export declare const fromWorker: <T>(worker: Worker | Blob | string, opts?: Partial<FromWorkerOpts> | undefined) => import("./stream").Stream<T>;
|
|
34
|
+
export declare const fromWorker: <T>(worker: Worker | Blob | string, opts?: Partial<FromWorkerOpts> | undefined) => import("./stream.js").Stream<T>;
|
|
35
35
|
//# sourceMappingURL=worker.d.ts.map
|
package/worker.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defWorker } from "./defworker";
|
|
2
|
-
import { __optsWithID } from "./idgen";
|
|
3
|
-
import { LOGGER } from "./logger";
|
|
4
|
-
import { stream } from "./stream";
|
|
1
|
+
import { defWorker } from "./defworker.js";
|
|
2
|
+
import { __optsWithID } from "./idgen.js";
|
|
3
|
+
import { LOGGER } from "./logger.js";
|
|
4
|
+
import { stream } from "./stream.js";
|
|
5
5
|
/**
|
|
6
6
|
* Returns a {@link Stream} which adds `message` and `error` event
|
|
7
7
|
* listeners to given `worker` and then emits received values.
|