@thi.ng/random 3.3.0 → 3.3.1

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-05-22T17:15:18Z
3
+ - **Last updated**: 2022-06-09T16:14:01Z
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/random",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
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,18 +34,18 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.3.6",
38
- "@thi.ng/checks": "^3.1.6",
39
- "@thi.ng/errors": "^2.1.6",
40
- "@thi.ng/hex": "^2.1.6"
37
+ "@thi.ng/api": "^8.3.7",
38
+ "@thi.ng/checks": "^3.2.0",
39
+ "@thi.ng/errors": "^2.1.7",
40
+ "@thi.ng/hex": "^2.1.7"
41
41
  },
42
42
  "devDependencies": {
43
- "@microsoft/api-extractor": "^7.23.1",
44
- "@thi.ng/testament": "^0.2.7",
43
+ "@microsoft/api-extractor": "^7.25.0",
44
+ "@thi.ng/testament": "^0.2.8",
45
45
  "rimraf": "^3.0.2",
46
46
  "tools": "^0.0.1",
47
- "typedoc": "^0.22.15",
48
- "typescript": "^4.6.4"
47
+ "typedoc": "^0.22.17",
48
+ "typescript": "^4.7.3"
49
49
  },
50
50
  "keywords": [
51
51
  "binary",
@@ -156,5 +156,5 @@
156
156
  "ksuid"
157
157
  ]
158
158
  },
159
- "gitHead": "e23901b8582af71d8a29e0ce4929f15ac509f9e5\n"
159
+ "gitHead": "9e516d30a1a537e027a6b3d78bf9121bc5831d31\n"
160
160
  }
@@ -28,5 +28,5 @@ export declare const uniqueValuesFrom: (k: number, fn: Fn0<number>, existing?: n
28
28
  * @param maxTrials -
29
29
  * @param rnd -
30
30
  */
31
- export declare const uniqueIndices: (k: number, max: number, existing?: number[] | undefined, maxTrials?: number, rnd?: IRandom) => number[];
31
+ export declare const uniqueIndices: (k: number, max: number, existing?: number[], maxTrials?: number, rnd?: IRandom) => number[];
32
32
  //# sourceMappingURL=unique-indices.d.ts.map
package/uuid.d.ts CHANGED
@@ -7,7 +7,7 @@ import type { IRandom } from "./api.js";
7
7
  * @param buf -
8
8
  * @param rnd -
9
9
  */
10
- export declare const uuidv4Bytes: (buf?: Uint8Array | undefined, rnd?: IRandom | undefined) => Uint8Array;
10
+ export declare const uuidv4Bytes: (buf?: Uint8Array, rnd?: IRandom) => Uint8Array;
11
11
  /**
12
12
  * Returns a UUID string, either from given byte array, or if omitted, using a
13
13
  * new UUID v4 produced by {@link uuidv4Bytes}.
@@ -15,5 +15,5 @@ export declare const uuidv4Bytes: (buf?: Uint8Array | undefined, rnd?: IRandom |
15
15
  * @param id - byte array
16
16
  * @param i - start index
17
17
  */
18
- export declare const uuid: (id?: ArrayLike<number> | undefined, i?: number) => string;
18
+ export declare const uuid: (id?: ArrayLike<number>, i?: number) => string;
19
19
  //# sourceMappingURL=uuid.d.ts.map
@@ -18,7 +18,7 @@ import type { IRandom } from "./api.js";
18
18
  * @param choices -
19
19
  * @param weights - optional weights
20
20
  */
21
- export declare const weightedRandom: <T>(choices: T[], weights?: ArrayLike<number> | undefined, rnd?: IRandom) => () => T;
21
+ export declare const weightedRandom: <T>(choices: T[], weights?: ArrayLike<number>, rnd?: IRandom) => () => T;
22
22
  /**
23
23
  * Alt version of {@link weightedRandom}, accepting an object of weights
24
24
  * instead. The returned function will return keys of given `choices` object,