@thi.ng/csp 2.1.101 → 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 +1 -1
- package/README.md +9 -14
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
<!-- This file is generated - DO NOT EDIT! -->
|
|
2
2
|
<!-- Please see: https://github.com/thi-ng/umbrella/blob/develop/CONTRIBUTING.md#changes-to-readme-files -->
|
|
3
|
-
> [!IMPORTANT]
|
|
4
|
-
> ‼️ Announcing the thi.ng user survey 2024 📋
|
|
5
|
-
>
|
|
6
|
-
> [Please participate in the survey here!](https://forms.gle/XacbSDEmQMPZg8197)\
|
|
7
|
-
> (open until end of February)
|
|
8
|
-
>
|
|
9
|
-
> **To achieve a better sample size, I'd highly appreciate if you could
|
|
10
|
-
> circulate the link to this survey in your own networks.**
|
|
11
|
-
>
|
|
12
|
-
> [Discussion](https://github.com/thi-ng/umbrella/discussions/447)
|
|
13
|
-
|
|
14
3
|
# 
|
|
15
4
|
|
|
16
5
|
[](https://www.npmjs.com/package/@thi.ng/csp)
|
|
@@ -22,7 +11,7 @@
|
|
|
22
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
23
12
|
> and anti-framework.
|
|
24
13
|
>
|
|
25
|
-
> 🚀
|
|
14
|
+
> 🚀 Please help me to work full-time on these projects by [sponsoring me on
|
|
26
15
|
> GitHub](https://github.com/sponsors/postspectacular). Thank you! ❤️
|
|
27
16
|
|
|
28
17
|
- [About](#about)
|
|
@@ -196,11 +185,14 @@ paths.into(["src/channel.ts", "src/mult.ts", "src/pubsub.ts"]);
|
|
|
196
185
|
### Channel merging
|
|
197
186
|
|
|
198
187
|
```ts
|
|
188
|
+
import { Channel } from "@thi.ng/csp";
|
|
189
|
+
import { push } from "@thi.ng/transducers";
|
|
190
|
+
|
|
199
191
|
Channel.merge([
|
|
200
192
|
Channel.range(0, 3),
|
|
201
193
|
Channel.range(10, 15),
|
|
202
194
|
Channel.range(100, 110)
|
|
203
|
-
]).reduce(
|
|
195
|
+
]).reduce(push()).then(console.log);
|
|
204
196
|
|
|
205
197
|
// [ 0, 100, 101, 102, 103, 1, 2, 104, 105, 10, 11, 12, 13, 106, 14, 107, 108, 109 ]
|
|
206
198
|
|
|
@@ -237,10 +229,13 @@ Channel.mergeTuples([
|
|
|
237
229
|
### PubSub
|
|
238
230
|
|
|
239
231
|
```ts
|
|
232
|
+
import { Channel, PubSub } from "@thi.ng/csp";
|
|
233
|
+
import { map } from "@thi.ng/transducers";
|
|
234
|
+
|
|
240
235
|
// define a channel publisher with transducer and topic function applied to each item
|
|
241
236
|
// the input channel receives names and transforms them into indexable objects
|
|
242
237
|
const pub = new PubSub(
|
|
243
|
-
new Channel<any>("users",
|
|
238
|
+
new Channel<any>("users", map((x: string) => ({ type: x.charAt(0), val: x }))),
|
|
244
239
|
(x) => x.type
|
|
245
240
|
);
|
|
246
241
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/csp",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.103",
|
|
4
4
|
"description": "ES6 promise based CSP primitives & operations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"testnode": "tsc -p test && node build/test/node.js"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/api": "^8.9.
|
|
43
|
-
"@thi.ng/arrays": "^2.8.
|
|
44
|
-
"@thi.ng/checks": "^3.5.
|
|
45
|
-
"@thi.ng/dcons": "^3.2.
|
|
46
|
-
"@thi.ng/errors": "^2.4.
|
|
47
|
-
"@thi.ng/transducers": "^8.9.
|
|
42
|
+
"@thi.ng/api": "^8.9.27",
|
|
43
|
+
"@thi.ng/arrays": "^2.8.5",
|
|
44
|
+
"@thi.ng/checks": "^3.5.1",
|
|
45
|
+
"@thi.ng/dcons": "^3.2.98",
|
|
46
|
+
"@thi.ng/errors": "^2.4.19",
|
|
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": "
|
|
106
|
+
"gitHead": "df9e312af741d87e6b450afcfea6a6e381662b1e\n"
|
|
107
107
|
}
|