1.0.0 • Published 1 year ago

@valtech-commerce/terminal-pad v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@valtech-commerce/terminal-pad

npm npm dependencies npms Travis CI Code style ESLint

Terminal-friendly string pad

Install

$ npm install @valtech-commerce/terminal-pad

Usage

const chalk = require('chalk');
const pad   = require('@valtech-commerce/terminal-pad');

pad(chalk.bgRed('📛 Error'), 20);
//=> '📛 Error             '

API

pad(text, length)

Returns a String with padded text

text

Required Type: String

The text to pad.

length

Required Type: Number

The total length of outputted string.

License

MIT © Valtech Canada inc.

1.0.0

1 year ago