cmstead / bannerator

A simple banner generator which will select random strings from an array to display

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bannerator

Bannerator makes it easy to integrate randomized banner output to your script or CLI project. This can be especially useful if you want to surface a number of informational topics to your users.

Installation

Use NPM to install this package:

npm install bannerator

Usage

Bannerator is a small, simple output utility. Below is an example of how to use the entire system.

const bannerator = require('bannerator').buildBannerator();

bannerator.setBannerText([
    'Don\'t forget to commit your changes!',
    'You can always find the docs at https://www.npmjs.com/package/bannerator'
]);

bannerator.setBannerSurround('%$%$% ');

bannerator.displayBanner();

This will output with one of the two strings like below:

%$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% 

Don\'t forget to commit your changes!

%$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% 

About

A simple banner generator which will select random strings from an array to display

License:Mozilla Public License 2.0


Languages

Language:JavaScript 100.0%