This commit is contained in:
Daniel Odendahl Jr
2017-06-01 08:44:02 +00:00
parent 7802bb49cb
commit 14f85f94bd
129 changed files with 1915 additions and 1720 deletions
+7 -4
View File
@@ -14,11 +14,14 @@ module.exports = class MorseCommand extends Command {
key: 'text',
prompt: 'What text would you like to convert to morse?',
type: 'string',
validate: text => {
if (letterTrans(text, dictionary, ' ').length < 1999) return true;
return 'Your text is too long.';
validate: (text) => {
if (letterTrans(text, dictionary, ' ').length < 1999) {
return true;
} else {
return 'Your text is too long.';
}
},
parse: text => letterTrans(text.toLowerCase(), dictionary, ' ')
parse: (text) => letterTrans(text.toLowerCase(), dictionary, ' ')
}
]
});