MCPcopy Index your code
hub / github.com/ExtropyIO/SolanaBootcamp / getUserInput

Function getUserInput

utils/utils.ts:250–269  ·  view source on GitHub ↗
(
  text: string = "Input text"
)

Source from the content-addressed store, hash-verified

248 * Function to get user's input from the CLI
249 */
250export async function getUserInput(
251 text: string = "Input text"
252): Promise<string> {
253 const rl = readline.createInterface({
254 input: process.stdin,
255 output: process.stdout,
256 });
257
258 let user_input: string = "";
259
260 console.log(text);
261
262 for await (const ui of rl) {
263 user_input = ui;
264
265 rl.close();
266 }
267
268 return user_input;
269}

Callers 5

mainFunction · 0.90
writePDAFunction · 0.90
createPDAFunction · 0.90
readPDAFunction · 0.90
getPrimesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected