Yoo-Hoo! Its a tiny library for printing a noticeable banner of words for your project. Such as below,
/\\\ /\\\ /\\\\\\\\ /\\\\\\\\ /\\\ /\\\ /\\\\\\\\ /\\\\\\\\
\/\\\ /\\\ /\\\_____/\\\ /\\\_____/\\\ \/\\\ \/\\\ /\\\_____/\\\ /\\\_____/\\\
\/_\\\/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\
\/_\\\\ \/\\\ \/\\\ \/\\\ \/\\\ /\\\\\\\\\ \/\\\\\\\\\\\ \/\\\ \/\\\ \/\\\ \/\\\
\/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/_______/ \/\\\____/\\\ \/\\\ \/\\\ \/\\\ \/\\\
\/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\
\/\\\ \/_/\\\\\\\\\ \/_/\\\\\\\\\ \/\\\ \/\\\ \/_/\\\\\\\\\ \/_/\\\\\\\\\
\/_/ \/_______/ \/_______/ \/_/ \/_/ \/_______/ \/_______/
Maybe useful when you want a banner for your project. Have fun!
npm i yoo-hoo
import { yo } from 'yoo-hoo';
yo('GOOD');
or in commonjs
const { yo } = require('yoo-hoo');
yo('GOOD');
yo(text: string, options?: Option): string[]
It will return the lines for printing. Then you can print it yourself line by line.
Options:
- spacing:
number
The number of spacing between two characters. Default1
. - maxLineWidth:
number
The max length of lines. If exceedmaxLineWidth
following characters will get a line feed. DefaultInfinity
. - color:
string
Setting the color for print. Defaultnone
. There contains several values:random
choosing a random color from the palettenone
with no color setting- any other color string supported by chalk
- silent:
boolean
Whether to prevent print characters when callingyo()
. Defaultfalse
.
For example,
yo('ho', { color: 'blue' });
Then it will print a blue HO
.
๐ค
yoo-hoo
can be used in both NodeJS and browsers.
- 26 letters:
A-Z
(letters will be converted to uppercase) - 10 numbers:
0-9
- some punctuations:
ยท
*
-
|
Characters that are not supported will be ignored.
npm run example
/\\\ /\\\ /\\\\\\\\ /\\\\\\\\ /\\\ /\\\ /\\\\\\\\ /\\\\\\\\
\/\\\ /\\\ /\\\_____/\\\ /\\\_____/\\\ \/\\\ \/\\\ /\\\_____/\\\ /\\\_____/\\\
\/_\\\/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\
\/_\\\\ \/\\\ \/\\\ \/\\\ \/\\\ /\\\\\\\\\ \/\\\\\\\\\\\ \/\\\ \/\\\ \/\\\ \/\\\
\/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/_______/ \/\\\____/\\\ \/\\\ \/\\\ \/\\\ \/\\\
\/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\
\/\\\ \/_/\\\\\\\\\ \/_/\\\\\\\\\ \/\\\ \/\\\ \/_/\\\\\\\\\ \/_/\\\\\\\\\
\/_/ \/_______/ \/_______/ \/_/ \/_/ \/_______/ \/_______/