diff --git a/commands/share.js b/commands/share.js index 6651add..be1d68c 100644 --- a/commands/share.js +++ b/commands/share.js @@ -19,6 +19,24 @@ function done(url) { } +/** + * Check if the value is not an empty value + * + * - Throw `Required field` if empty + * + * @param {String} input + * @return {Boolean} + */ +function isSet(input) { + + if (!input) { + return new Error('Required field'); + } + + return true; + +} + /** * The command's main function *