repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge dependabot/npm_and_yarn/examples/typescript/websocket-server-pool/ws-cluster...
[poolifier.git]
/
src
/
utils.ts
diff --git
a/src/utils.ts
b/src/utils.ts
index 7a0ed2f6d0d877f25a57772540bd58083c51b726..b84c4c803efe974b1dde4d8e3988465bef6d94b7 100644
(file)
--- a/
src/utils.ts
+++ b/
src/utils.ts
@@
-1,4
+1,5
@@
import * as os from 'node:os'
import * as os from 'node:os'
+import { webcrypto } from 'node:crypto'
import type {
MeasurementStatisticsRequirements,
WorkerChoiceStrategyOptions
import type {
MeasurementStatisticsRequirements,
WorkerChoiceStrategyOptions
@@
-253,5
+254,5
@@
export const once = (
* @returns A number in the [0,1[ range
*/
export const secureRandom = (): number => {
* @returns A number in the [0,1[ range
*/
export const secureRandom = (): number => {
- return crypto.getRandomValues(new Uint32Array(1))[0] / 0x100000000
+ return
web
crypto.getRandomValues(new Uint32Array(1))[0] / 0x100000000
}
}