@thi.ng/csp 3.3.8 → 3.3.9

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 CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  > [!NOTE]
10
- > This is one of 210 standalone projects, maintained as part
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
  >
package/mult.js CHANGED
@@ -83,14 +83,14 @@ class Mult {
83
83
  */
84
84
  unsubscribeAll(close = true) {
85
85
  if (close) {
86
- for (let t of this.taps) t.close();
86
+ for (const t of this.taps) t.close();
87
87
  }
88
88
  this.taps.length = 0;
89
89
  }
90
90
  async process() {
91
91
  let x;
92
92
  while ((x = await this.src.read()) !== void 0) {
93
- for (let t of this.taps) {
93
+ for (const t of this.taps) {
94
94
  if (!await t.write(x)) {
95
95
  this.unsubscribe(t);
96
96
  }
package/ops.js CHANGED
@@ -3,15 +3,15 @@ import { assert } from "@thi.ng/errors/assert";
3
3
  import { Channel } from "./channel.js";
4
4
  const broadcast = async (src, dest, close = true) => {
5
5
  for await (let x of src) {
6
- for (let chan of dest) chan.write(x);
6
+ for (const chan of dest) chan.write(x);
7
7
  }
8
8
  if (close) {
9
- for (let chan of dest) chan.close();
9
+ for (const chan of dest) chan.close();
10
10
  }
11
11
  };
12
12
  const concat = async (dest, chans, close = true) => {
13
13
  return (async () => {
14
- for (let c of chans) {
14
+ for (const c of chans) {
15
15
  await consumeWith(c, (x) => dest.write(x));
16
16
  }
17
17
  close && dest.close();
@@ -73,7 +73,7 @@ const pipe = (src, dest, close = true) => {
73
73
  const select = async (input, ...rest) => {
74
74
  const inputs = shuffle([input, ...rest]);
75
75
  const sel = await Promise.race(inputs.map((x) => x.race()));
76
- for (let chan of inputs) {
76
+ for (const chan of inputs) {
77
77
  if (chan !== sel) chan.races.shift();
78
78
  }
79
79
  if (sel.writes.readable()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/csp",
3
- "version": "3.3.8",
3
+ "version": "3.3.9",
4
4
  "description": "Primitives & operators for Communicating Sequential Processes based on async/await and async iterables",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -43,11 +43,11 @@
43
43
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
44
44
  },
45
45
  "dependencies": {
46
- "@thi.ng/api": "^8.12.9",
47
- "@thi.ng/arrays": "^2.14.2",
48
- "@thi.ng/buffers": "^1.0.28",
49
- "@thi.ng/checks": "^3.7.25",
50
- "@thi.ng/errors": "^2.5.49"
46
+ "@thi.ng/api": "^8.12.10",
47
+ "@thi.ng/arrays": "^2.14.3",
48
+ "@thi.ng/buffers": "^1.0.29",
49
+ "@thi.ng/checks": "^3.8.0",
50
+ "@thi.ng/errors": "^2.5.50"
51
51
  },
52
52
  "devDependencies": {
53
53
  "esbuild": "^0.27.0",
@@ -109,5 +109,5 @@
109
109
  "status": "beta",
110
110
  "year": 2016
111
111
  },
112
- "gitHead": "fdca77cabf47dd23a9ab17a5ca13e3060075c12c\n"
112
+ "gitHead": "824bf9047b5a10f777c5c5b4aeecf0c750a22c75\n"
113
113
  }
package/pubsub.js CHANGED
@@ -84,7 +84,7 @@ class PubSub {
84
84
  topic && await topic.write(x);
85
85
  x = null;
86
86
  }
87
- for (let t of Object.values(this.topics)) {
87
+ for (const t of Object.values(this.topics)) {
88
88
  t.close();
89
89
  }
90
90
  this.topics = {};