1 | const chalk = require("chalk"),
|
2 | shell = require("shelljs");
|
3 |
|
4 | /**
|
5 | * @name title
|
6 | * @param {String} str The string used as the title.
|
7 | * @param {String} [icon] An optional Unicode character or Emoji to use in the title.
|
8 | */
|
9 | function title(str, icon = "") {
|
10 | shell.echo(chalk.bold(`\n\n${icon.length ? `${icon} ` : ""}${str}`));
|
11 | shell.echo(chalk.gray("\n——————————————————————————————————————————————\n"));
|
12 | }
|
13 |
|
14 | module.exports = {title};
|