MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / readLine

Function readLine

src/setup/prompt.ts:289–297  ·  view source on GitHub ↗

Single-line read from stdin, returning the user's input without the trailing newline.

(promptText: string)

Source from the content-addressed store, hash-verified

287
288/** Single-line read from stdin, returning the user's input without the trailing newline. */
289function readLine(promptText: string): Promise<string> {
290 return new Promise((resolve) => {
291 const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
292 rl.question(promptText, (answer) => {
293 rl.close();
294 resolve(answer);
295 });
296 });
297}

Callers 3

confirmFunction · 0.85
chooseNumberedFunction · 0.85
textFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected