Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
feat: removed question mark if no emojis are configured
Browse files Browse the repository at this point in the history
closes #9
  • Loading branch information
snaerth authored and streamich committed Dec 10, 2018
1 parent c0e4ca8 commit 212c172
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/questions/type.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 212c172

Please sign in to comment.