UNPKG

projecthor

Version:

Save, manage, and run project setup commands automatically from the CLI.

14 lines (13 loc) 385 B
import readline from 'readline'; export async function ask(prompt) { return await new Promise(resolve => { const cliInterface = readline.createInterface({ input: process.stdin, output: process.stdout, }); cliInterface.question(`${prompt}\n`, ans => { cliInterface.close(); resolve(ans); }); }); }