diff --git a/lib/questions/type.js b/lib/questions/type.js index cd545665..9af965de 100644 --- a/lib/questions/type.js +++ b/lib/questions/type.js @@ -1,9 +1,13 @@ const pad = require('pad-right'); -const typeToListItem = ({description, emoji, value}) => ({ - name: (emoji || '❔') + ' ' + pad(value + ':', 12, ' ') + description, - value -}); +const typeToListItem = ({description, emoji, value}) => { + const prefix = emoji ? emoji + ' ' : ''; + + return { + name: prefix + pad(value + ':', 12, ' ') + description, + value + } +}; exports.createQuestion = (state) => { const {config} = state;