return new Promise((resolve, reject) => { try { this.question(`${key}: ` + (defaultVal ? `[${defaultVal}]` : ''), function (val) { resolve(val || defaultVal); });
}); this.rl.on('SIGINT', () => { this.rl.question('Are you sure you want to exit? (y|n) ', (answer) => { if (answer.match(/^y(es)?$/i)) { this._exit();
return new Promise((resolve, reject) => { try { this.question(`${key}: ` + (defaultVal ? `[${defaultVal}]` : ''), function (val) { resolve(val || defaultVal); });