Bump nanoid from 3.1.25 to 3.2.0
[benchmarks-js.git] / random.js
index 4b41596fd2b0ad3d1a6adaa818ec941135b48644..98b59ed34f5241db671aad996fecc51b58ecdb05 100644 (file)
--- a/random.js
+++ b/random.js
@@ -1,18 +1,10 @@
 const Benchmark = require('benchmark')
-const crypto = require('crypto')
-const { LIST_FORMATTER } = require('./benchmark-utils')
+const { LIST_FORMATTER, secureRandom } = require('./benchmark-utils')
 
 const suite = new Benchmark.Suite()
 
 const maximum = 1000
 
-/**
- *
- */
-function secureRandom () {
-  return crypto.randomBytes(4).readUInt32LE() / 0x100000000
-}
-
 /**
  * @param max
  * @param min