repositories
/
benchmarks-js.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build: update volta pnpm version
[benchmarks-js.git]
/
benchmark-utils.mjs
diff --git
a/benchmark-utils.mjs
b/benchmark-utils.mjs
index 202a9a08ac4eb42f79f975e23b0f00f03fc1d9e7..d3757b5ef619adfee8d0c3a48e93a5012b319529 100644
(file)
--- a/
benchmark-utils.mjs
+++ b/
benchmark-utils.mjs
@@
-1,4
+1,4
@@
-import crypto from 'crypto'
+import crypto
, { webcrypto }
from 'crypto'
/**
* Generate a cryptographically secure random number in the [0,1[ range
/**
* Generate a cryptographically secure random number in the [0,1[ range
@@
-9,11
+9,11
@@
export function secureRandom () {
}
/**
}
/**
- *
Generate a cryptographically secure random number in the [0,1[ range
+ * Generate a cryptographically secure random number in the [0,1[ range
* @returns
*/
export function secureRandomWithRandomValues () {
* @returns
*/
export function secureRandomWithRandomValues () {
- return crypto.getRandomValues(new Uint32Array(1))[0] / 0x100000000
+ return
web
crypto.getRandomValues(new Uint32Array(1))[0] / 0x100000000
}
/**
}
/**