diff --git a/plop-templates/utils.js b/plop-templates/utils.js index 0310ca02b30ce7c02cbc9b238c4fd00c2a36815a..049875397992e2a75bfc71bb537b24844d7726fc 100644 --- a/plop-templates/utils.js +++ b/plop-templates/utils.js @@ -1,9 +1,2 @@ -exports.notEmpty = name => { - return v => { - if (!v || v.trim === '') { - return `${name} is required` - } else { - return true - } - } -} +exports.notEmpty = name => v => + !v || v.trim() === '' ? `${name} is required` : true