ask-all-questions

0.1.3 • Public • Published

ask-all-questions

Simple Node.JS module to show and read many questions on command line applications.

Installation

Run the command:

npm i ask-all-questions

Example:

var askAllQuestions = require('ask-all-questions');

askAllQuestions([
	{ name: 'user', question: 'user: ' },
	{ name: 'password', question: 'password: ' },
	{ name: 'applicationName', question: 'application name: ' },
	{ name: 'applicationPath', question: 'application path: ' }
], function (prompts) {
	console.dir(prompts);
});

Or with promise:

var askAllQuestions = require('ask-all-questions');

askAllQuestions([
	{ name: 'user', question: 'user: ' },
	{ name: 'password', question: 'password: ' },
	{ name: 'applicationName', question: 'application name: ' },
	{ name: 'applicationPath', question: 'application path: ' }
]).then(function (prompts) {
	console.dir(prompts);
});

This shows these questions:

user: myUserName
password: myPassword
application name: myApp
application path: c:\projects\myProject

and print:

	{ user: 'myUserName',
	  password: 'myPassword',
	  applicationName: 'myApp',
	  applicationPath: 'c:\\projects\\myProject' }

Package Sidebar

Install

npm i ask-all-questions

Weekly Downloads

1

Version

0.1.3

License

MIT

Last publish

Collaborators

  • lvendrame