How to use the enquirer.StringPrompt function in enquirer

To help you get started, we’ve selected a few enquirer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github enquirer / enquirer / examples / string / option-initial-hint.js View on Github external
'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);
github enquirer / enquirer / examples / string / prompt.js View on Github external
'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);
github enquirer / enquirer / examples / string / option-initial.js View on Github external
'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);
github enquirer / enquirer / examples / string / option-hint.js View on Github external
'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);