@thi.ng/proctext 1.0.28 → 1.0.30

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +10 -1
  3. package/package.json +12 -12
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2025-07-10T14:20:23Z
3
+ - **Last updated**: 2025-07-21T08:21:58Z
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
@@ -36,6 +36,12 @@
36
36
 
37
37
  Extensible procedural text generation engine with dynamic, mutable state, indirection, randomizable & recursive variable expansions.
38
38
 
39
+ > [!NOTE]
40
+ > The generated output of the code examples in this readme might vary due to the
41
+ > inherent randomness in the system. Please consult the [controlled
42
+ > randomness](#controlled-randomness) section for further information about
43
+ > deterministic outputs.
44
+
39
45
  ## Features
40
46
 
41
47
  The generator works with a simple plain text format, supporting the following
@@ -310,7 +316,7 @@ configured via options given to `generate()`:
310
316
 
311
317
  ```ts
312
318
  import { generate } from "@thi.ng/proctext";
313
- import { SYSTEM } from "@thi.ng/random";
319
+ import { SYSTEM, XsAdd } from "@thi.ng/random";
314
320
 
315
321
  // here we show default options used
316
322
  generate(`...`, {
@@ -318,6 +324,9 @@ generate(`...`, {
318
324
  maxHist: 1,
319
325
  maxTrials: 10
320
326
  });
327
+
328
+ // using a seeded PRNG for deterministic behavior/output
329
+ generate(`...`, { rnd: new XsAdd(0xdecafbad) });
321
330
  ```
322
331
 
323
332
  The `maxHist = 1` means that for each variable only the last value picked will
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/proctext",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "description": "Extensible procedural text generation engine with dynamic, mutable state, indirection, randomizable & recursive variable expansions",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -39,18 +39,18 @@
39
39
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@thi.ng/api": "^8.11.30",
43
- "@thi.ng/arrays": "^2.13.3",
44
- "@thi.ng/checks": "^3.7.10",
45
- "@thi.ng/defmulti": "^3.0.70",
46
- "@thi.ng/errors": "^2.5.36",
47
- "@thi.ng/object-utils": "^1.2.2",
48
- "@thi.ng/parse": "^2.6.19",
49
- "@thi.ng/random": "^4.1.21",
50
- "@thi.ng/strings": "^3.9.16"
42
+ "@thi.ng/api": "^8.11.32",
43
+ "@thi.ng/arrays": "^2.13.5",
44
+ "@thi.ng/checks": "^3.7.12",
45
+ "@thi.ng/defmulti": "^3.0.72",
46
+ "@thi.ng/errors": "^2.5.38",
47
+ "@thi.ng/object-utils": "^1.2.4",
48
+ "@thi.ng/parse": "^2.6.21",
49
+ "@thi.ng/random": "^4.1.23",
50
+ "@thi.ng/strings": "^3.9.18"
51
51
  },
52
52
  "devDependencies": {
53
- "esbuild": "^0.25.6",
53
+ "esbuild": "^0.25.8",
54
54
  "typedoc": "^0.28.7",
55
55
  "typescript": "^5.8.3"
56
56
  },
@@ -98,5 +98,5 @@
98
98
  "status": "alpha",
99
99
  "year": 2023
100
100
  },
101
- "gitHead": "4e98c38a817045d0e9a5b8bb6da23c00a721c3e0\n"
101
+ "gitHead": "11747c482773d3da03c8b7848b25a56251ccd759\n"
102
102
  }