Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
const { StringPrompt } = require('enquirer');
const prompt = new StringPrompt({
message: 'What is your username?',
initial: 'jonschlinkert',
hint: '...start typing'
});
prompt.run()
.then(answer => console.log('ANSWER:', answer))
.catch(console.log);
'use strict';
const { StringPrompt } = require('enquirer');
const prompt = new StringPrompt({
message: 'What is your username?'
});
prompt.run()
.then(answer => console.log('ANSWER:', answer))
.catch(console.log);
'use strict';
const { StringPrompt } = require('enquirer');
const prompt = new StringPrompt({
message: 'What is your username?',
initial: 'jonschlinkert'
});
prompt.run()
.then(answer => console.log('ANSWER:', answer))
.catch(console.log);
'use strict';
const { StringPrompt } = require('enquirer');
const prompt = new StringPrompt({
message: 'What is your username?',
hint: '...start typing'
});
prompt.run()
.then(answer => console.log('ANSWER:', answer))
.catch(console.log);