MCPcopy Create free account
hub / github.com/across-protocol/relayer / askQuestion

Function askQuestion

scripts/utils.ts:20–29  ·  view source on GitHub ↗
(query: string)

Source from the content-addressed store, hash-verified

18};
19
20async function askQuestion(query: string) {
21 const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
22
23 return new Promise((resolve) =>
24 rl.question(query, (ans) => {
25 rl.close();
26 resolve(ans);
27 })
28 );
29}
30
31export async function askYesNoQuestion(query: string): Promise<boolean> {
32 const ans = (await askQuestion(`${query} (y/n) `)) as string;

Callers 1

askYesNoQuestionFunction · 0.85

Calls 1

closeMethod · 0.80

Tested by

no test coverage detected