-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdemo.js
40 lines (37 loc) · 837 Bytes
/
demo.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
39
40
import createDebug from 'debug';
import colorFormatter from './src';
createDebug.formatters.c = colorFormatter;
const debug = createDebug('demo');
debug.enabled = true;
debug(
'Fancy mode is disabled, set %coptions.fancy.enabled%c to change.',
'color: cyan',
''
);
debug(
'%c!%c 429 Too Many Requests. The request will be retried.',
'color: red',
''
);
debug(
'%cWARNING%c This feature will be deprecated in the next release.',
'font-weight: bold; background-color: #ffcf00; color: black',
''
);
debug(
'%cUnderlined text!%c Still bold here.%c',
'font-weight: bold; text-decoration: underline',
'text-decoration: none',
''
);
debug(
'It’s a %cr%ca%ci%cn%cb%co%cw%c!',
'color: red',
'color: orange',
'color: yellow',
'color: green',
'color: blue',
'color: purple',
'color: magenta',
''
);