multiline-billboard
About | Installation | Usage | License
About
A Node.js module to format a string or array of strings into a billboard. Useful for displaying text in a CLI application. Configurable colors, border characters, and justification with sane defaults.
Turn this:
console
Into this:
Installation
Install and require as a standard Node module.
Install
$ npm install --save multiline-billboard
Require
var billboard =
Usage
/* @param {String|String[]} strOrStrs - text to put in billboard @param {Object} [customOpts] - opts to override defaults @returns {String} billboard */
billboard
is a function that takes two params:
- a string or array of strings to build the billboard around
- an object of custom options to override the defaults (optional)
See defaults for the default options. Each option is overrideable. ansi-styles is used to color the border and text; check its documentation for supported colors. Accepted values for justify
are 'left'
, 'right'
, and 'center'
.