We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c94350 commit 6d88db5Copy full SHA for 6d88db5
plop-templates/utils.js
@@ -1,9 +1,2 @@
1
-exports.notEmpty = name => {
2
- return v => {
3
- if (!v || v.trim === '') {
4
- return `${name} is required`
5
- } else {
6
- return true
7
- }
8
9
-}
+exports.notEmpty = name => v =>
+ !v || v.trim() === '' ? `${name} is required` : true
0 commit comments