📅  最后修改于: 2022-03-11 15:04:26.590000             🧑  作者: Mango
const { Confirm } = require('enquirer'); const prompt = new Confirm({ name: 'question', message: 'Want to answer?'}); prompt.run() .then(answer => console.log('Answer:', answer)) .catch(console.error);