@thi.ng/transducers-async 0.4.36 → 0.4.38

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 212 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.24 KB
119
+ Package sizes (brotli'd, pre-treeshake): ESM: 3.25 KB
120
120
 
121
121
  ## Dependencies
122
122
 
package/as-async.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { wait } from "./delayed.js";
2
2
  async function* asAsyncIterable(src, delay = 0) {
3
- for (let x of src) {
3
+ for (const x of src) {
4
4
  yield x;
5
5
  if (delay > 0) await wait(delay);
6
6
  }
package/concat.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ensureIterable } from "./ensure.js";
2
2
  async function* concat(...sources) {
3
- for (let src of sources) {
3
+ for (const src of sources) {
4
4
  src != null && (yield* ensureIterable(src));
5
5
  }
6
6
  }
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 (let fn of interceptors) {
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 (let s of this.subs) s.resolve(val);
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 (let s of this.subs) s.resolve(void 0);
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.36",
3
+ "version": "0.4.38",
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.9",
43
- "@thi.ng/buffers": "^1.0.28",
44
- "@thi.ng/checks": "^3.7.25",
45
- "@thi.ng/compose": "^3.0.46",
46
- "@thi.ng/errors": "^2.5.49",
47
- "@thi.ng/timestamp": "^1.1.28",
48
- "@thi.ng/transducers": "^9.6.18"
42
+ "@thi.ng/api": "^8.12.11",
43
+ "@thi.ng/buffers": "^1.0.30",
44
+ "@thi.ng/checks": "^3.8.1",
45
+ "@thi.ng/compose": "^3.0.48",
46
+ "@thi.ng/errors": "^2.6.0",
47
+ "@thi.ng/timestamp": "^1.1.30",
48
+ "@thi.ng/transducers": "^9.6.20"
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": "fdca77cabf47dd23a9ab17a5ca13e3060075c12c\n"
214
+ "gitHead": "e7a21b9d2a188fa04d4c893d8531c40fbc0f4c06\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 (let s of subs) s.resolve(val);
70
+ for (const s of subs) s.resolve(val);
71
71
  await Promise.all(subs.map((x) => x.notifyP));
72
72
  }
73
- for (let subs of this.topics.values()) {
74
- for (let s of subs) s.resolve(void 0);
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
@@ -2,7 +2,7 @@ import { Range } from "@thi.ng/transducers/range";
2
2
  import { wait } from "./delayed.js";
3
3
  async function* range(...args) {
4
4
  const delay = args.pop();
5
- for (let x of new Range(...args)) {
5
+ for (const x of new Range(...args)) {
6
6
  yield x;
7
7
  await wait(delay);
8
8
  }
package/zip.js CHANGED
@@ -4,7 +4,7 @@ async function* zip(...src) {
4
4
  );
5
5
  while (true) {
6
6
  const tuple = [];
7
- for (let i of iters) {
7
+ for (const i of iters) {
8
8
  let v = await i.next();
9
9
  if (v.done) return;
10
10
  tuple.push(v.value);