INNER CODE UNIT · JavaScript
main
ekzhang/setwithfriends · scripts/src/index.js:17
async function main() {
const { script } = await inquirer.prompt([
{
type: "list",
name: "script",
message: "Which script would you like to run?",
choices: scripts.map((f) => ({ name: f.name, value: f })),
},
]);
const output = await script();
if (output !== undefined) {
console.log(output);
}
}
main().then(() => process.exit());