Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { BooleanPrompt } = require('enquirer');
const prompt = new BooleanPrompt({
name: 'answer',
message: 'Want to answer?',
initial: false
});
prompt.run()
.then(answer => console.log('Answer:', answer))
.catch(console.error);
const { BooleanPrompt } = require('enquirer');
const prompt = new BooleanPrompt({ name: 'answer', message: 'Want to answer?' });
prompt.run()
.then(answer => console.log('Answer:', answer))
.catch(console.error);