questionnaire
v0.1.1
Published
Simple command-line questionnaire
Downloads
645
Readme
questionnaire
The easiest way to ask user questions via command line.
Installation
$ npm install questionnaire
Usage
var questionnaire = require('questionnaire');
var questions = [
{
id: 'os',
text: 'Do you prefer (1) OSX, (2) Windows or (3) Linux?',
options: ['osx', 'windows', 'linux']
},
{
id: 'coffee',
text: 'Do you like coffee with (1) milk or with (2) sugar?',
options: ['milk', 'sugar']
},
{
id: 'actor',
options: ['Stephen Fry', 'Hugh Laurie']
}
];
var answers = questionnaire(questions);
console.log("Here are the answers: #{JSON.stringify(answers)}")
Contributing
Feel free to add issues, fork and send pull-requests.