@thi.ng/csp 2.1.102 → 2.1.103

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-03-01T15:22:50Z
3
+ - **Last updated**: 2024-03-02T14:05:53Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/README.md CHANGED
@@ -185,11 +185,14 @@ paths.into(["src/channel.ts", "src/mult.ts", "src/pubsub.ts"]);
185
185
  ### Channel merging
186
186
 
187
187
  ```ts
188
+ import { Channel } from "@thi.ng/csp";
189
+ import { push } from "@thi.ng/transducers";
190
+
188
191
  Channel.merge([
189
192
  Channel.range(0, 3),
190
193
  Channel.range(10, 15),
191
194
  Channel.range(100, 110)
192
- ]).reduce(tx.push()).then(console.log);
195
+ ]).reduce(push()).then(console.log);
193
196
 
194
197
  // [ 0, 100, 101, 102, 103, 1, 2, 104, 105, 10, 11, 12, 13, 106, 14, 107, 108, 109 ]
195
198
 
@@ -226,10 +229,13 @@ Channel.mergeTuples([
226
229
  ### PubSub
227
230
 
228
231
  ```ts
232
+ import { Channel, PubSub } from "@thi.ng/csp";
233
+ import { map } from "@thi.ng/transducers";
234
+
229
235
  // define a channel publisher with transducer and topic function applied to each item
230
236
  // the input channel receives names and transforms them into indexable objects
231
237
  const pub = new PubSub(
232
- new Channel<any>("users", tx.map((x: string) => ({ type: x.charAt(0), val: x }))),
238
+ new Channel<any>("users", map((x: string) => ({ type: x.charAt(0), val: x }))),
233
239
  (x) => x.type
234
240
  );
235
241
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/csp",
3
- "version": "2.1.102",
3
+ "version": "2.1.103",
4
4
  "description": "ES6 promise based CSP primitives & operations",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -40,11 +40,11 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@thi.ng/api": "^8.9.27",
43
- "@thi.ng/arrays": "^2.8.4",
43
+ "@thi.ng/arrays": "^2.8.5",
44
44
  "@thi.ng/checks": "^3.5.1",
45
- "@thi.ng/dcons": "^3.2.97",
45
+ "@thi.ng/dcons": "^3.2.98",
46
46
  "@thi.ng/errors": "^2.4.19",
47
- "@thi.ng/transducers": "^8.9.8"
47
+ "@thi.ng/transducers": "^8.9.9"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@microsoft/api-extractor": "^7.40.1",
@@ -103,5 +103,5 @@
103
103
  "status": "deprecated",
104
104
  "year": 2016
105
105
  },
106
- "gitHead": "d660ae8fd1bf64d919b4334f19509f1f539d70f6\n"
106
+ "gitHead": "df9e312af741d87e6b450afcfea6a6e381662b1e\n"
107
107
  }