@thi.ng/rstream 9.3.18 → 9.4.0
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/README.md +1 -1
- package/checks.d.ts +3 -1
- package/checks.js +5 -1
- package/package.json +4 -4
package/README.md
CHANGED
package/checks.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { CloseMode, ISubscribable } from "./api.js";
|
|
1
|
+
import type { CloseMode, ISubscribable, ISubscriber, ISubscription } from "./api.js";
|
|
2
|
+
export declare const isSubscriber: (x: any) => x is ISubscriber<any>;
|
|
2
3
|
export declare const isSubscribable: (x: any) => x is ISubscribable<any>;
|
|
4
|
+
export declare const isSubscriptionLike: (x: any) => x is ISubscription<any, any>;
|
|
3
5
|
/**
|
|
4
6
|
* Returns true if mode is FIRST, or if mode is LAST *and* `num = 0`.
|
|
5
7
|
*
|
package/checks.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { implementsFunction } from "@thi.ng/checks/implements-function";
|
|
2
|
+
const isSubscriber = (x) => implementsFunction(x, "next");
|
|
2
3
|
const isSubscribable = (x) => implementsFunction(x, "subscribe");
|
|
4
|
+
const isSubscriptionLike = (x) => isSubscriber(x) && isSubscribable(x);
|
|
3
5
|
const isFirstOrLastInput = (mode, num) => mode === "first" || mode === "last" && !num;
|
|
4
6
|
export {
|
|
5
7
|
isFirstOrLastInput,
|
|
6
|
-
isSubscribable
|
|
8
|
+
isSubscribable,
|
|
9
|
+
isSubscriber,
|
|
10
|
+
isSubscriptionLike
|
|
7
11
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/rstream",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.0",
|
|
4
4
|
"description": "Reactive streams & subscription primitives for constructing dataflow graphs / pipelines",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@thi.ng/api": "^8.12.16",
|
|
48
48
|
"@thi.ng/arrays": "^2.14.12",
|
|
49
|
-
"@thi.ng/associative": "^7.1.
|
|
49
|
+
"@thi.ng/associative": "^7.1.32",
|
|
50
50
|
"@thi.ng/atom": "^5.3.57",
|
|
51
51
|
"@thi.ng/checks": "^3.8.6",
|
|
52
52
|
"@thi.ng/errors": "^2.6.5",
|
|
53
53
|
"@thi.ng/logger": "^3.3.0",
|
|
54
|
-
"@thi.ng/transducers": "^9.6.
|
|
54
|
+
"@thi.ng/transducers": "^9.6.29"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/node": "^24.10.9",
|
|
@@ -223,5 +223,5 @@
|
|
|
223
223
|
],
|
|
224
224
|
"year": 2017
|
|
225
225
|
},
|
|
226
|
-
"gitHead": "
|
|
226
|
+
"gitHead": "18e5911e6d52c86190706438b753de415379d3fa\n"
|
|
227
227
|
}
|