Comparing version 1.0.1 to 1.0.2
@@ -13,4 +13,2 @@ /** | ||
var HELP_CHOICE = 'Help, list all options'; | ||
/** | ||
@@ -38,3 +36,3 @@ * Module exports | ||
key: 'h', | ||
name: HELP_CHOICE, | ||
name: 'Help, list all options', | ||
value: 'help' | ||
@@ -48,3 +46,3 @@ }); | ||
return choice !== HELP_CHOICE; | ||
return choice !== 'help'; | ||
}; | ||
@@ -123,3 +121,3 @@ | ||
return selected.short || selected.name; | ||
return selected.value || selected.name; | ||
}; | ||
@@ -154,3 +152,3 @@ | ||
Prompt.prototype.onError = function (state) { | ||
if (state.value === HELP_CHOICE) { | ||
if (state.value === 'help') { | ||
this.selectedKey = ''; | ||
@@ -170,3 +168,4 @@ this.status = 'expanded'; | ||
this.status = 'answered'; | ||
this.answer = state.value; | ||
var choice = this.opt.choices.where({value: state.value})[0]; | ||
this.answer = choice.short || choice.name; | ||
@@ -173,0 +172,0 @@ // Re-render prompt |
{ | ||
"name": "inquirer", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A collection of common interactive command line user interfaces.", | ||
@@ -5,0 +5,0 @@ "author": "Simon Boudrias <admin@simonboudrias.com>", |
@@ -175,3 +175,3 @@ Inquirer.js | ||
Take `type`, `name`, `message`, `choices`[, `default`, `filter`] properties. (Note that | ||
Take `type`, `name`, `message`, `choices`[, `default`] properties. (Note that | ||
default must be the choice `index` in the array) | ||
@@ -178,0 +178,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62827