@thi.ng/proctext 1.0.28 → 1.0.29
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 +10 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
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.
|
|
3
|
+
"version": "1.0.29",
|
|
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.
|
|
43
|
-
"@thi.ng/arrays": "^2.13.
|
|
44
|
-
"@thi.ng/checks": "^3.7.
|
|
45
|
-
"@thi.ng/defmulti": "^3.0.
|
|
46
|
-
"@thi.ng/errors": "^2.5.
|
|
47
|
-
"@thi.ng/object-utils": "^1.2.
|
|
48
|
-
"@thi.ng/parse": "^2.6.
|
|
49
|
-
"@thi.ng/random": "^4.1.
|
|
50
|
-
"@thi.ng/strings": "^3.9.
|
|
42
|
+
"@thi.ng/api": "^8.11.31",
|
|
43
|
+
"@thi.ng/arrays": "^2.13.4",
|
|
44
|
+
"@thi.ng/checks": "^3.7.11",
|
|
45
|
+
"@thi.ng/defmulti": "^3.0.71",
|
|
46
|
+
"@thi.ng/errors": "^2.5.37",
|
|
47
|
+
"@thi.ng/object-utils": "^1.2.3",
|
|
48
|
+
"@thi.ng/parse": "^2.6.20",
|
|
49
|
+
"@thi.ng/random": "^4.1.22",
|
|
50
|
+
"@thi.ng/strings": "^3.9.17"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"esbuild": "^0.25.
|
|
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": "
|
|
101
|
+
"gitHead": "3cd1bea8b2bf6b859609f6d5c14b4eb64745681f\n"
|
|
102
102
|
}
|