-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.js
38 lines (25 loc) · 1.28 KB
/
example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const leeks = require('../dist/index.js'); // Replace with "leeks.js" if not using from the Git repository
const error = leeks.colors.red;
console.log(error('Error - There were no leeks!'));
console.log(leeks.colors.red('Hello') + leeks.colors.green(' I like leeks!'));
console.log(leeks.colors.bgRed('Hello') + leeks.colors.bgGreen(' I like leeks!'));
console.log(leeks.colors.blue(leeks.styles.underline('Hello!')));
console.log(leeks.styles.underline('Hello'));
console.log(leeks.colours.grey('Hello!'));
console.log(leeks.colors.gray('Hello!'));
console.log(leeks.eightBit(32, 'hello'));
console.log(leeks.eightBitBg(32, 'hello'));
console.log(leeks.rgb([114, 137, 218], 'hello'));
console.log(leeks.rgbBg([114, 137, 218], 'hello'));
console.log(leeks.hex('#7289da', 'hello'));
console.log(leeks.hexBg('#7289da', 'hello'));
console.log(leeks.keywords.aqua('Hello'));
console.log(leeks.bgKeywords.aqua('Hello'));
leeks.disableColours();
console.log(error('test'));
leeks.enableColours();
console.log(error('test'));
console.log(leeks.colours.blue`hello there`);
leeks.alias('primary', 'colours', leeks.colours.green);
console.log(leeks.colours.primary('hi'));
console.log(leeks.short('&!3&0&0 Hello &r &2&o&nworld!&r &lBold&r &nUnderlined&r &oItalic&r ✏HEX&r &!#009999&0more HEX'));