diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2024-01-11 07:37:25 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-10 15:37:25 -0700 |
commit | 515a34b4de222e35c7ade1b92614d746e73d4c2e (patch) | |
tree | 8284201fc826a33f12597959a8a8be14e0f524bd /ext/node/polyfills/internal/crypto/_randomInt.ts | |
parent | d4893eb51a01c5a692d8ca74a3b8ff95c5fd1d9f (diff) |
refactor: use `core.ensureFastOps()` (#21888)
Diffstat (limited to 'ext/node/polyfills/internal/crypto/_randomInt.ts')
-rw-r--r-- | ext/node/polyfills/internal/crypto/_randomInt.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/node/polyfills/internal/crypto/_randomInt.ts b/ext/node/polyfills/internal/crypto/_randomInt.ts index aba5a9b26..072d74c11 100644 --- a/ext/node/polyfills/internal/crypto/_randomInt.ts +++ b/ext/node/polyfills/internal/crypto/_randomInt.ts @@ -4,7 +4,9 @@ // deno-lint-ignore-file prefer-primordials import { core } from "ext:core/mod.js"; -const ops = core.ops; +const { + op_node_random_int, +} = core.ensureFastOps(); export default function randomInt(max: number): number; export default function randomInt(min: number, max: number): number; @@ -49,7 +51,7 @@ export default function randomInt( min = Math.ceil(min); max = Math.floor(max); - const result = ops.op_node_random_int(min, max); + const result = op_node_random_int(min, max); if (cb) { cb(null, result); |