https://github.com/cmstead/bannerator
A simple banner generator which will select random strings from an array to display
https://github.com/cmstead/bannerator
Last synced: about 1 year ago
JSON representation
A simple banner generator which will select random strings from an array to display
- Host: GitHub
- URL: https://github.com/cmstead/bannerator
- Owner: cmstead
- License: mpl-2.0
- Created: 2019-09-19T17:23:20.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-11T02:04:09.000Z (over 6 years ago)
- Last Synced: 2025-01-18T15:25:35.095Z (over 1 year ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
```javascript
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!
%$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$% %$%$%
```