Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Commit 2d4da62

Browse files
committed
crypto.randomInt is back-ported on Node.js v12.19.0
1 parent 92633cf commit 2d4da62

File tree

1 file changed

+4
-4
lines changed
  • app/nodejs-v14/src/main/scala/io/scalajs/nodejs/crypto

1 file changed

+4
-4
lines changed

app/nodejs-v14/src/main/scala/io/scalajs/nodejs/crypto/Crypto.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,13 @@ trait Crypto extends js.Object {
310310
js.native
311311
def randomFill[T <: scala.scalajs.js.typedarray.TypedArray[_, T]](buffer: T, callback: Callback1[T]): T = js.native
312312

313-
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs14)
313+
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
314314
def randomInt(max: Int): Int = js.native
315-
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs14)
315+
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
316316
def randomInt(max: Int, callback: Callback1[Int]): Unit = js.native
317-
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs14)
317+
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
318318
def randomInt(min: Int, max: Int): Int = js.native
319-
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs14)
319+
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
320320
def randomInt(min: Int, max: Int, callback: Callback1[Int]): Unit = js.native
321321

322322
def scrypt(password: String, salt: String, keylen: Int, options: ScryptOptions, callback: Callback1[Buffer]): Unit =

0 commit comments

Comments
 (0)