diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/js/41_prompt.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/js/41_prompt.js b/runtime/js/41_prompt.js index e9f10e244..fce1ac9ac 100644 --- a/runtime/js/41_prompt.js +++ b/runtime/js/41_prompt.js @@ -1,6 +1,9 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, primordials } from "ext:core/mod.js"; const { + op_read_line_prompt, +} = core.ensureFastOps(); +const { ArrayPrototypePush, StringPrototypeCharCodeAt, Uint8Array, @@ -9,8 +12,6 @@ const { import { isatty } from "ext:runtime/40_tty.js"; import { stdin } from "ext:deno_io/12_io.js"; -const ops = core.ops; - const LF = StringPrototypeCharCodeAt("\n", 0); const CR = StringPrototypeCharCodeAt("\r", 0); @@ -43,7 +44,7 @@ function prompt(message = "Prompt", defaultValue) { return null; } - return ops.op_read_line_prompt( + return op_read_line_prompt( `${message} `, `${defaultValue}`, ); |