1 | function repeat(str, times){
|
2 | return new Array(times + 1).join(str);
|
3 | }
|
4 |
|
5 | function header(text){
|
6 | var bar = repeat('#', text.length + 4);
|
7 | console.log('{white}' + bar + '{/white}');
|
8 | console.log('{white}#{/white} {bold}' + text + '{/bold} {white}#{/white}');
|
9 | console.log('{white}' + bar + '{/white}');
|
10 | }
|
11 |
|
12 | module.exports = header;
|