@thi.ng/transducers-async 0.4.36 → 0.4.37
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 +2 -2
- package/as-async.js +1 -1
- package/concat.js +1 -1
- package/intercept.js +1 -1
- package/mult.js +2 -2
- package/package.json +9 -9
- package/pubsub.js +3 -3
- package/range.js +1 -1
- package/zip.js +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 211 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
|
@@ -116,7 +116,7 @@ For Node.js REPL:
|
|
|
116
116
|
const txa = await import("@thi.ng/transducers-async");
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 3.
|
|
119
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 3.25 KB
|
|
120
120
|
|
|
121
121
|
## Dependencies
|
|
122
122
|
|
package/as-async.js
CHANGED
package/concat.js
CHANGED
package/intercept.js
CHANGED
|
@@ -3,7 +3,7 @@ import { iterator1 } from "./iterator.js";
|
|
|
3
3
|
function intercept(interceptors = [], src) {
|
|
4
4
|
if (src) return iterator1(intercept(interceptors), src);
|
|
5
5
|
const xform = (rfn) => compR(rfn, async (acc, x) => {
|
|
6
|
-
for (
|
|
6
|
+
for (const fn of interceptors) {
|
|
7
7
|
const res = await fn(x);
|
|
8
8
|
if (res == null) return acc;
|
|
9
9
|
x = res;
|
package/mult.js
CHANGED
|
@@ -18,12 +18,12 @@ class Mult {
|
|
|
18
18
|
this.isActive = true;
|
|
19
19
|
(async () => {
|
|
20
20
|
for await (let val of this.src) {
|
|
21
|
-
for (
|
|
21
|
+
for (const s of this.subs) s.resolve(val);
|
|
22
22
|
if (val === void 0) this.subs.length = 0;
|
|
23
23
|
if (!this.subs.length) break;
|
|
24
24
|
await Promise.all(this.subs.map((x) => x.notifyP));
|
|
25
25
|
}
|
|
26
|
-
for (
|
|
26
|
+
for (const s of this.subs) s.resolve(void 0);
|
|
27
27
|
this.subs.length = 0;
|
|
28
28
|
this.isActive = false;
|
|
29
29
|
})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/transducers-async",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.37",
|
|
4
4
|
"description": "Async versions of various highly composable transducers, reducers and iterators",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/api": "^8.12.
|
|
43
|
-
"@thi.ng/buffers": "^1.0.
|
|
44
|
-
"@thi.ng/checks": "^3.
|
|
45
|
-
"@thi.ng/compose": "^3.0.
|
|
46
|
-
"@thi.ng/errors": "^2.5.
|
|
47
|
-
"@thi.ng/timestamp": "^1.1.
|
|
48
|
-
"@thi.ng/transducers": "^9.6.
|
|
42
|
+
"@thi.ng/api": "^8.12.10",
|
|
43
|
+
"@thi.ng/buffers": "^1.0.29",
|
|
44
|
+
"@thi.ng/checks": "^3.8.0",
|
|
45
|
+
"@thi.ng/compose": "^3.0.47",
|
|
46
|
+
"@thi.ng/errors": "^2.5.50",
|
|
47
|
+
"@thi.ng/timestamp": "^1.1.29",
|
|
48
|
+
"@thi.ng/transducers": "^9.6.19"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"esbuild": "^0.27.0",
|
|
@@ -211,5 +211,5 @@
|
|
|
211
211
|
"status": "alpha",
|
|
212
212
|
"year": 2018
|
|
213
213
|
},
|
|
214
|
-
"gitHead": "
|
|
214
|
+
"gitHead": "824bf9047b5a10f777c5c5b4aeecf0c750a22c75\n"
|
|
215
215
|
}
|
package/pubsub.js
CHANGED
|
@@ -67,11 +67,11 @@ class PubSub {
|
|
|
67
67
|
const topic = this.topicFn(val);
|
|
68
68
|
const subs = this.topics.get(topic);
|
|
69
69
|
if (!subs?.length) continue;
|
|
70
|
-
for (
|
|
70
|
+
for (const s of subs) s.resolve(val);
|
|
71
71
|
await Promise.all(subs.map((x) => x.notifyP));
|
|
72
72
|
}
|
|
73
|
-
for (
|
|
74
|
-
for (
|
|
73
|
+
for (const subs of this.topics.values()) {
|
|
74
|
+
for (const s of subs) s.resolve(void 0);
|
|
75
75
|
}
|
|
76
76
|
this.topics.clear();
|
|
77
77
|
this.isActive = false;
|
package/range.js
CHANGED