@thi.ng/random 3.3.17 → 3.3.19

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**: 2022-11-30T22:27:38Z
3
+ - **Last updated**: 2022-12-20T16:33:11Z
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
@@ -1,10 +1,10 @@
1
1
  <!-- This file is generated - DO NOT EDIT! -->
2
2
 
3
- # ![random](https://media.thi.ng/umbrella/banners-20220914/thing-random.svg?c79b7908)
3
+ # ![@thi.ng/random](https://media.thi.ng/umbrella/banners-20220914/thing-random.svg?c79b7908)
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/random.svg)](https://www.npmjs.com/package/@thi.ng/random)
6
6
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/random.svg)
7
- [![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella)
7
+ [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  This project is part of the
10
10
  [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.
@@ -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
@@ -89,11 +89,8 @@ ES module import:
89
89
 
90
90
  For Node.js REPL:
91
91
 
92
- ```text
93
- # with flag only for < v16
94
- node --experimental-repl-await
95
-
96
- > const random = await import("@thi.ng/random");
92
+ ```js
93
+ const random = await import("@thi.ng/random");
97
94
  ```
98
95
 
99
96
  Package sizes (brotli'd, pre-treeshake): ESM: 1.83 KB
@@ -154,7 +151,7 @@ rnd.minmaxInt(10, 20)
154
151
 
155
152
  ## Authors
156
153
 
157
- Karsten Schmidt
154
+ - [Karsten Schmidt](https://thi.ng)
158
155
 
159
156
  If this project contributes to an academic publication, please cite it as:
160
157
 
@@ -169,4 +166,4 @@ If this project contributes to an academic publication, please cite it as:
169
166
 
170
167
  ## License
171
168
 
172
- &copy; 2015 - 2022 Karsten Schmidt // Apache Software License 2.0
169
+ &copy; 2015 - 2022 Karsten Schmidt // Apache License 2.0
package/api.d.ts CHANGED
@@ -40,5 +40,5 @@ export interface IRandom extends INorm {
40
40
  export interface ISeedable<T> {
41
41
  seed(n: T): this;
42
42
  }
43
- export declare type ISeedableRandom<T> = IRandom & ISeedable<T> & ICopy<IRandom>;
43
+ export type ISeedableRandom<T> = IRandom & ISeedable<T> & ICopy<IRandom>;
44
44
  //# sourceMappingURL=api.d.ts.map
@@ -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: {@link https://en.wikipedia.org/wiki/Central_limit_theorem}
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: {@link https://en.wikipedia.org/wiki/Central_limit_theorem}
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.17",
3
+ "version": "3.3.19",
4
4
  "description": "Pseudo-random number generators w/ unified API, distributions, weighted choices, ID generation",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -21,7 +21,7 @@
21
21
  "url": "https://patreon.com/thing_umbrella"
22
22
  }
23
23
  ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
24
+ "author": "Karsten Schmidt (https://thi.ng)",
25
25
  "license": "Apache-2.0",
26
26
  "scripts": {
27
27
  "build": "yarn clean && tsc --declaration",
@@ -34,18 +34,18 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.5.1",
38
- "@thi.ng/checks": "^3.3.4",
39
- "@thi.ng/errors": "^2.2.5",
40
- "@thi.ng/hex": "^2.3.1"
37
+ "@thi.ng/api": "^8.6.1",
38
+ "@thi.ng/checks": "^3.3.5",
39
+ "@thi.ng/errors": "^2.2.6",
40
+ "@thi.ng/hex": "^2.3.2"
41
41
  },
42
42
  "devDependencies": {
43
- "@microsoft/api-extractor": "^7.33.5",
44
- "@thi.ng/testament": "^0.3.6",
43
+ "@microsoft/api-extractor": "^7.33.7",
44
+ "@thi.ng/testament": "^0.3.7",
45
45
  "rimraf": "^3.0.2",
46
46
  "tools": "^0.0.1",
47
- "typedoc": "^0.23.20",
48
- "typescript": "^4.8.4"
47
+ "typedoc": "^0.23.22",
48
+ "typescript": "^4.9.4"
49
49
  },
50
50
  "keywords": [
51
51
  "binary",
@@ -156,5 +156,5 @@
156
156
  "ksuid"
157
157
  ]
158
158
  },
159
- "gitHead": "1fe40da507070653f420156d91e6b27cf682004f\n"
159
+ "gitHead": "7b2af448da8a63fb21704a79cc4cdf1f3d7d7a64\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 {@link @thi.ng/ksuid#} for a more advanced and collision-free approach.
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 {@link @thi.ng/ksuid#} for a more advanced and collision-free approach.
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
@@ -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
- * {@link https://www.electricmonk.nl/log/2009/12/23/weighted-random-distribution/}
16
+ * https://www.electricmonk.nl/log/2009/12/23/weighted-random-distribution/
17
17
  *
18
18
  * @param choices -
19
19
  * @param weights - optional weights
@@ -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
- * {@link https://www.electricmonk.nl/log/2009/12/23/weighted-random-distribution/}
16
+ * https://www.electricmonk.nl/log/2009/12/23/weighted-random-distribution/
17
17
  *
18
18
  * @param choices -
19
19
  * @param weights - optional weights