MCPcopy Index your code
hub / github.com/nodejs/node / prompt

Method prompt

lib/internal/readline/interface.js:429–437  ·  view source on GitHub ↗

* Writes the configured `prompt` to a new line in `output`. * @param {boolean} [preserveCursor] * @returns {void}

(preserveCursor)

Source from the content-addressed store, hash-verified

427 * @returns {void}
428 */
429 prompt(preserveCursor) {
430 if (this.paused) this.resume();
431 if (this.terminal && process.env.TERM !== 'dumb') {
432 if (!preserveCursor) this.cursor = 0;
433 this[kRefreshLine]();
434 } else {
435 this[kWriteToOutput](this[kPrompt]);
436 }
437 }
438
439 [kQuestion](query, cb) {
440 if (this.closed) {

Callers 15

[kQuestion]Method · 0.95
constructorMethod · 0.80
displayPromptMethod · 0.80
box2d.jsFile · 0.80
copy.jsFile · 0.80
zlib.jsFile · 0.80
lua_binarytrees.jsFile · 0.80
fannkuch.jsFile · 0.80
primes.jsFile · 0.80
memops.jsFile · 0.80

Calls 1

resumeMethod · 0.95

Tested by

no test coverage detected