@thi.ng/random 3.3.18 → 3.3.20
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 +1 -1
- package/distributions/gaussian.d.ts +1 -1
- package/distributions/gaussian.js +1 -1
- package/package.json +7 -7
- package/random-id.d.ts +2 -1
- package/random-id.js +2 -1
- package/weighted-random.d.ts +1 -1
- package/weighted-random.js +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ This project is part of the
|
|
|
24
24
|
|
|
25
25
|
## About
|
|
26
26
|
|
|
27
|
-
Pseudo-random number generators w/ unified API, distributions, weighted choices, ID generation
|
|
27
|
+
Pseudo-random number generators w/ unified API, distributions, weighted choices, ID generation.
|
|
28
28
|
|
|
29
29
|
This package provides the `IRandom` interface and various (mostly seedable)
|
|
30
30
|
pseudo-random number generator implementations, incl. `IRandom` wrappers for
|
|
@@ -8,7 +8,7 @@ import type { IRandom } from "../api.js";
|
|
|
8
8
|
* The default configuration produces samples in the approx. [-0.5,0.5] range
|
|
9
9
|
* with a ~12% standard deviation.
|
|
10
10
|
*
|
|
11
|
-
* Reference:
|
|
11
|
+
* Reference: https://en.wikipedia.org/wiki/Central_limit_theorem
|
|
12
12
|
*
|
|
13
13
|
* @param rnd - default `SYSTEM`
|
|
14
14
|
* @param n - num samples, default 24
|
|
@@ -8,7 +8,7 @@ import { SYSTEM } from "../system.js";
|
|
|
8
8
|
* The default configuration produces samples in the approx. [-0.5,0.5] range
|
|
9
9
|
* with a ~12% standard deviation.
|
|
10
10
|
*
|
|
11
|
-
* Reference:
|
|
11
|
+
* Reference: https://en.wikipedia.org/wiki/Central_limit_theorem
|
|
12
12
|
*
|
|
13
13
|
* @param rnd - default `SYSTEM`
|
|
14
14
|
* @param n - num samples, default 24
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/random",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.20",
|
|
4
4
|
"description": "Pseudo-random number generators w/ unified API, distributions, weighted choices, ID generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.6.
|
|
38
|
-
"@thi.ng/checks": "^3.3.
|
|
39
|
-
"@thi.ng/errors": "^2.2.
|
|
40
|
-
"@thi.ng/hex": "^2.3.
|
|
37
|
+
"@thi.ng/api": "^8.6.2",
|
|
38
|
+
"@thi.ng/checks": "^3.3.6",
|
|
39
|
+
"@thi.ng/errors": "^2.2.7",
|
|
40
|
+
"@thi.ng/hex": "^2.3.3"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@microsoft/api-extractor": "^7.33.7",
|
|
44
|
-
"@thi.ng/testament": "^0.3.
|
|
44
|
+
"@thi.ng/testament": "^0.3.8",
|
|
45
45
|
"rimraf": "^3.0.2",
|
|
46
46
|
"tools": "^0.0.1",
|
|
47
47
|
"typedoc": "^0.23.22",
|
|
@@ -156,5 +156,5 @@
|
|
|
156
156
|
"ksuid"
|
|
157
157
|
]
|
|
158
158
|
},
|
|
159
|
-
"gitHead": "
|
|
159
|
+
"gitHead": "bc6f7f5e2765bb96fe64db804eaf4b2443b47fc6\n"
|
|
160
160
|
}
|
package/random-id.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ import type { IRandom } from "./api.js";
|
|
|
5
5
|
* lowercase a-z).
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* See
|
|
8
|
+
* See [thi.ng/ksuid](https://thi.ng/thi.ng/ksuid) for a more advanced and
|
|
9
|
+
* collision-free approach.
|
|
9
10
|
*
|
|
10
11
|
* @example
|
|
11
12
|
* ```ts
|
package/random-id.js
CHANGED
|
@@ -5,7 +5,8 @@ import { SYSTEM } from "./system.js";
|
|
|
5
5
|
* lowercase a-z).
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* See
|
|
8
|
+
* See [thi.ng/ksuid](https://thi.ng/thi.ng/ksuid) for a more advanced and
|
|
9
|
+
* collision-free approach.
|
|
9
10
|
*
|
|
10
11
|
* @example
|
|
11
12
|
* ```ts
|
package/weighted-random.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import type { IRandom } from "./api.js";
|
|
|
13
13
|
* the resulting function will only ever return the first `choice`.
|
|
14
14
|
*
|
|
15
15
|
* Based on:
|
|
16
|
-
*
|
|
16
|
+
* https://www.electricmonk.nl/log/2009/12/23/weighted-random-distribution/
|
|
17
17
|
*
|
|
18
18
|
* @param choices -
|
|
19
19
|
* @param weights - optional weights
|
package/weighted-random.js
CHANGED
|
@@ -13,7 +13,7 @@ import { SYSTEM } from "./system.js";
|
|
|
13
13
|
* the resulting function will only ever return the first `choice`.
|
|
14
14
|
*
|
|
15
15
|
* Based on:
|
|
16
|
-
*
|
|
16
|
+
* https://www.electricmonk.nl/log/2009/12/23/weighted-random-distribution/
|
|
17
17
|
*
|
|
18
18
|
* @param choices -
|
|
19
19
|
* @param weights - optional weights
|