MCPcopy Create free account
hub / github.com/dcgtc/dgrants / waitForInput

Function waitForInput

contracts/scripts/ScriptLogger.ts:4–12  ·  view source on GitHub ↗
(query: string)

Source from the content-addressed store, hash-verified

2import readline from 'readline';
3
4export const waitForInput = (query: string): Promise<unknown> => {
5 const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
6 return new Promise((resolve) =>
7 rl.question(query, (ans) => {
8 rl.close();
9 resolve(ans);
10 })
11 );
12};
13
14export class ScriptLogger {
15 // filenames

Callers 1

confirmContinueMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected