@thi.ng/random 3.6.35 → 3.6.37
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/package.json +10 -10
- package/unique-indices.d.ts +1 -1
- package/weighted-random.d.ts +1 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/random",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.37",
|
|
4
4
|
"description": "Pseudo-random number generators w/ unified API, distributions, weighted choices, ID generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@thi.ng/api": "^8.9.
|
|
40
|
-
"@thi.ng/checks": "^3.5.
|
|
41
|
-
"@thi.ng/errors": "^2.
|
|
42
|
-
"@thi.ng/hex": "^2.3.
|
|
39
|
+
"@thi.ng/api": "^8.9.30",
|
|
40
|
+
"@thi.ng/checks": "^3.5.3",
|
|
41
|
+
"@thi.ng/errors": "^2.5.0",
|
|
42
|
+
"@thi.ng/hex": "^2.3.40"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@microsoft/api-extractor": "^7.
|
|
46
|
-
"esbuild": "^0.20.
|
|
45
|
+
"@microsoft/api-extractor": "^7.42.3",
|
|
46
|
+
"esbuild": "^0.20.1",
|
|
47
47
|
"rimraf": "^5.0.5",
|
|
48
|
-
"typedoc": "^0.25.
|
|
49
|
-
"typescript": "^5.
|
|
48
|
+
"typedoc": "^0.25.12",
|
|
49
|
+
"typescript": "^5.4.2"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"binary",
|
|
@@ -157,5 +157,5 @@
|
|
|
157
157
|
"ksuid"
|
|
158
158
|
]
|
|
159
159
|
},
|
|
160
|
-
"gitHead": "
|
|
160
|
+
"gitHead": "7f3fcbd6c0462b0ce45afa141fe163d1f297fd51\n"
|
|
161
161
|
}
|
package/unique-indices.d.ts
CHANGED
|
@@ -47,5 +47,5 @@ export declare const uniqueIndices: (k: number, max: number, existing?: number[]
|
|
|
47
47
|
* @param maxTrials
|
|
48
48
|
* @param rnd
|
|
49
49
|
*/
|
|
50
|
-
export declare const pickRandomUnique: <T>(k: number, src: T[], existing?: T[]
|
|
50
|
+
export declare const pickRandomUnique: <T>(k: number, src: T[], existing?: T[], maxTrials?: number, rnd?: IRandom) => T[];
|
|
51
51
|
//# sourceMappingURL=unique-indices.d.ts.map
|
package/weighted-random.d.ts
CHANGED
|
@@ -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
|
|
21
|
+
export declare const weightedRandom: <T>(choices: Array<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,
|