The main export is a constructor function that is used to create new Question
objects, which are used in prompts by [base-prompt][].
var Question = require('{%= name %}');
var question = new Question('color', 'What is favorite color?');
Examples
Any of the following signatures may be used:
var question = new Question('color'); // sets message as the same value as `name`
var question = new Question('color', 'What is favorite color?');
var question = new Question('color', {message: 'What is favorite color?'});
var question = new Question({name: 'color', message: 'What is favorite color?'});
var question = new Question({name: 'color'});
{%= apidocs("index.js") %}
- Support
.choices
as a function
- bumps [prompt-choices][]
- bumps [prompt-choices][]
- bumps [prompt-choices][]. A major bump was warranted due to potentially breaking changes in prompt-choices. Please see that library for more details.