mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 06:45:31 +02:00
oneOf
This commit is contained in:
@@ -15,10 +15,7 @@ module.exports = class BinaryCommand extends Command {
|
||||
key: 'mode',
|
||||
prompt: `Would you like to ${list(modes, 'or')}?`,
|
||||
type: 'string',
|
||||
validate: mode => {
|
||||
if (modes.includes(mode.toLowerCase())) return true;
|
||||
return `Invalid mode, please enter either ${list(modes, 'or')}.`;
|
||||
},
|
||||
oneOf: modes,
|
||||
parse: mode => mode.toLowerCase()
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user