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

Commit

Permalink
fix: πŸ› pad-right
Browse files Browse the repository at this point in the history
pad-right is no longer a dependency of a dependency. because of that we
need to stop relying on it. `String.padEnd` is the correct alternative
and is supported on NodeJS>=8.2.1
  • Loading branch information
rodrigograca31 committed Nov 18, 2020
1 parent 31d9af9 commit 94b063c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/questions/type.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
const pad = require('pad-right');
const fuzzy = require('fuzzy');

const typeToListItem = ({types, disableEmoji}, type) => {
const {description, emoji, value} = types[type];
const prefix = emoji && !disableEmoji ? emoji + ' ' : '';

return {
name: prefix + pad(value + ':', 12, ' ') + description,
name: prefix + value.padEnd(12, ' ') + description,
value
};
};
Expand Down

0 comments on commit 94b063c

Please sign in to comment.