Terminal-friendly string pad
$ npm install @valtech-commerce/terminal-pad
const chalk = require('chalk');
const pad = require('@valtech-commerce/terminal-pad');
pad(chalk.bgRed('📛 Error'), 20);
//=> '📛 Error '
Returns a String
with padded text
Required
Type: String
The text to pad.
Required
Type: Number
The total length of outputted string.
MIT © Valtech Canada inc.