promptQuestions

Prompts a series of questions, and stores the answers in an object.

Source:
Examples

questions is an object, which contains an asynchnous method, which returns a promise

const questions = require('./promptQuestions.js');
questions.promptQuestions().then(data => console.log(data)); 
// {
//   PROFILE_NAME: String, -> "myName"
//   WAITING_ROOM_NAME: String, -> "Black Friday Sale"
//   REGION: String, -> "us-east-1"
//   PROTECT_URL: String, -> "https://www.example.com"
//   RATE: Int -> 50
// }

Same example, but with object destructuring and async/await

const { promptQuestions } = require('./promptQuestions.js');
(async () => {
 let answers = await promptQuestions();
 console.log(answers);
})();

module:promptQuestions

Source:

Exports the promptQuestions function.

Returns:
Type
Object

Methods

(async, inner) promptQuestions() → {Object}

Source:

Returns an object that contains the answers to the prompted questions

Returns:
Type
Object