UNPKG

540 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const inquirer = require("inquirer");
4async function askForString(phrase, options = {}) {
5 const { response } = await inquirer.prompt([
6 Object.assign({ message: `${phrase}:`, name: 'response' }, options)
7 ]);
8 return response;
9}
10exports.askForString = askForString;
11async function askForPassword(phrase, options = {}) {
12 return askForString(phrase, Object.assign({}, options, { type: 'password' }));
13}
14exports.askForPassword = askForPassword;