1.0.3 • Published 6 years ago

cli-banner v1.0.3

Weekly downloads
90
License
MIT
Repository
github
Last release
6 years ago

CLI Banner

Create boxes around strings - great for console printing

yarn add -D cli-banner
# or
npm install --save-dev cli-banner

Module Usage

const banner = require('cli-banner');
const options = {}

console.log(banner('hello world', options)));

// ┌──────────────────────────────────────────────────────────────────────────────┐
// │                                                                              │
// │                                 hello world                                  │
// │                                                                              │
// └──────────────────────────────────────────────────────────────────────────────┘

CLI Usage

banner "hello world"

# ┌──────────────────────────────────────────────────────────────────────────────┐
# │                                                                              │
# │                                 hello world                                  │
# │                                                                              │
# └──────────────────────────────────────────────────────────────────────────────┘

Options

Property NameCLI NameDescriptionChoicesDefault
widthwidthWidth of the banner (including borders)any Number, "auto"80
colorcolorColor of the test"black", "red", "green", "yellow", "blue", "magenta", "cyan", "white", "gray", "redBright", "greenBright", "yellowBright", "blueBright", "magentaBright", "cyanBright", "whiteBright","white"
borderColorborder-colorColor of the border"black", "red", "green", "yellow", "blue", "magenta", "cyan", "white", "gray", "redBright", "greenBright", "yellowBright", "blueBright", "magentaBright", "cyanBright", "whiteBright","white""white"
paddingLengthMinimum amount of spaces on either side of the string3

Docs