@thi.ng/rstream 9.3.7 → 9.3.8

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
  >
@@ -1,6 +1,6 @@
1
1
  const __removeAllIDs = (impl, ids) => {
2
2
  let ok = true;
3
- for (let id of ids) {
3
+ for (const id of ids) {
4
4
  ok = impl.removeID(id) && ok;
5
5
  }
6
6
  return ok;
package/iterable.js CHANGED
@@ -14,7 +14,7 @@ const fromIterable = (src, opts = {}) => stream((stream2) => {
14
14
  return () => clearInterval(id);
15
15
  }, __optsWithID("iterable", opts));
16
16
  const fromIterableSync = (src, opts) => stream((stream2) => {
17
- for (let s of src) {
17
+ for (const s of src) {
18
18
  stream2.next(s);
19
19
  }
20
20
  stream2.closeIn !== "never" && stream2.done();
package/merge.js CHANGED
@@ -29,7 +29,7 @@ class StreamMerge extends Subscription {
29
29
  );
30
30
  }
31
31
  addAll(src) {
32
- for (let s of src) {
32
+ for (const s of src) {
33
33
  this.add(s);
34
34
  }
35
35
  }
@@ -43,7 +43,7 @@ class StreamMerge extends Subscription {
43
43
  return false;
44
44
  }
45
45
  removeID(id) {
46
- for (let s of this.sources) {
46
+ for (const s of this.sources) {
47
47
  if (s[0].id === id) {
48
48
  return this.remove(s[0]);
49
49
  }
@@ -52,7 +52,7 @@ class StreamMerge extends Subscription {
52
52
  }
53
53
  removeAll(src) {
54
54
  let ok = true;
55
- for (let s of src) {
55
+ for (const s of src) {
56
56
  ok = this.remove(s) && ok;
57
57
  }
58
58
  return ok;
@@ -62,7 +62,7 @@ class StreamMerge extends Subscription {
62
62
  }
63
63
  unsubscribe(sub) {
64
64
  if (!sub) {
65
- for (let s of this.sources.values()) {
65
+ for (const s of this.sources.values()) {
66
66
  s.unsubscribe();
67
67
  }
68
68
  this.state = State.DONE;
package/object.js CHANGED
@@ -19,7 +19,7 @@ class StreamObj extends Subscription {
19
19
  xform: dedupe(opts.equiv || ((a, b) => a === b)),
20
20
  ...opts
21
21
  } : opts;
22
- for (let k of this.keys) {
22
+ for (const k of this.keys) {
23
23
  this.streams[k] = subscription(void 0, {
24
24
  ..._opts,
25
25
  id: `${this.id}-${k}`
@@ -40,7 +40,7 @@ class StreamObj extends Subscription {
40
40
  */
41
41
  next(x) {
42
42
  this.cacheLast && (this.last = x);
43
- for (let k of this.keys) {
43
+ for (const k of this.keys) {
44
44
  const val = x[k];
45
45
  this.streams[k].next(
46
46
  this.defaults && val === void 0 ? this.defaults[k] : val
@@ -49,14 +49,14 @@ class StreamObj extends Subscription {
49
49
  super.next(x);
50
50
  }
51
51
  done() {
52
- for (let k of this.keys) {
52
+ for (const k of this.keys) {
53
53
  this.streams[k].done?.();
54
54
  }
55
55
  super.done();
56
56
  }
57
57
  unsubscribe(sub) {
58
58
  if (!sub) {
59
- for (let k of this.keys) {
59
+ for (const k of this.keys) {
60
60
  this.streams[k].unsubscribe();
61
61
  }
62
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/rstream",
3
- "version": "9.3.7",
3
+ "version": "9.3.8",
4
4
  "description": "Reactive streams & subscription primitives for constructing dataflow graphs / pipelines",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -43,14 +43,14 @@
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/associative": "^7.1.20",
49
- "@thi.ng/atom": "^5.3.50",
50
- "@thi.ng/checks": "^3.7.25",
51
- "@thi.ng/errors": "^2.5.49",
52
- "@thi.ng/logger": "^3.2.8",
53
- "@thi.ng/transducers": "^9.6.18"
46
+ "@thi.ng/api": "^8.12.10",
47
+ "@thi.ng/arrays": "^2.14.3",
48
+ "@thi.ng/associative": "^7.1.21",
49
+ "@thi.ng/atom": "^5.3.51",
50
+ "@thi.ng/checks": "^3.8.0",
51
+ "@thi.ng/errors": "^2.5.50",
52
+ "@thi.ng/logger": "^3.2.9",
53
+ "@thi.ng/transducers": "^9.6.19"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/node": "^24.10.1",
@@ -222,5 +222,5 @@
222
222
  ],
223
223
  "year": 2017
224
224
  },
225
- "gitHead": "fdca77cabf47dd23a9ab17a5ca13e3060075c12c\n"
225
+ "gitHead": "824bf9047b5a10f777c5c5b4aeecf0c750a22c75\n"
226
226
  }
package/pubsub.js CHANGED
@@ -58,7 +58,7 @@ class PubSub extends Subscription {
58
58
  }
59
59
  unsubscribe(sub) {
60
60
  if (!sub) {
61
- for (let t of this.topics.values()) {
61
+ for (const t of this.topics.values()) {
62
62
  t.unsubscribe();
63
63
  }
64
64
  this.topics.clear();
@@ -67,7 +67,7 @@ class PubSub extends Subscription {
67
67
  return unsupported();
68
68
  }
69
69
  done() {
70
- for (let t of this.topics.values()) {
70
+ for (const t of this.topics.values()) {
71
71
  t.done();
72
72
  }
73
73
  super.done();
package/sync.js CHANGED
@@ -76,10 +76,10 @@ class StreamSync extends Subscription {
76
76
  );
77
77
  }
78
78
  addAll(src) {
79
- for (let id in src) {
79
+ for (const id in src) {
80
80
  this.psync.add(id);
81
81
  }
82
- for (let id in src) {
82
+ for (const id in src) {
83
83
  this.add(src[id], id);
84
84
  }
85
85
  }
@@ -103,11 +103,11 @@ class StreamSync extends Subscription {
103
103
  return src ? this.remove(src) : false;
104
104
  }
105
105
  removeAll(src) {
106
- for (let s of src) {
106
+ for (const s of src) {
107
107
  this.psync.delete(this.invRealSourceIDs.get(s.id));
108
108
  }
109
109
  let ok = true;
110
- for (let s of src) {
110
+ for (const s of src) {
111
111
  ok = this.remove(s) && ok;
112
112
  }
113
113
  return ok;
@@ -120,7 +120,7 @@ class StreamSync extends Subscription {
120
120
  }
121
121
  getSources() {
122
122
  const res = {};
123
- for (let [id, src] of this.idSources) {
123
+ for (const [id, src] of this.idSources) {
124
124
  res[this.invRealSourceIDs.get(id)] = src;
125
125
  }
126
126
  return res;
@@ -128,7 +128,7 @@ class StreamSync extends Subscription {
128
128
  unsubscribe(sub) {
129
129
  if (!sub) {
130
130
  LOGGER.debug(this.id, "unsub sources");
131
- for (let s of this.sources.values()) {
131
+ for (const s of this.sources.values()) {
132
132
  s.unsubscribe();
133
133
  }
134
134
  this.sources.clear();