Skip to content

Commit 3492add

Browse files
committed
Update safe mode examples to avoid deprecated setTheme syntax
1 parent cfef595 commit 3492add

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/safe-string.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ console.log('Setting themes is useful');
3737
// Load theme with JSON literal
3838
colors.setTheme({
3939
silly: 'rainbow',
40-
input: 'grey',
40+
input: 'blue',
4141
verbose: 'cyan',
4242
prompt: 'grey',
4343
info: 'green',
@@ -54,14 +54,14 @@ console.log(colors.error('this is an error'));
5454
// outputs yellow text
5555
console.log(colors.warn('this is a warning'));
5656

57-
// outputs grey text
57+
// outputs blue text
5858
console.log(colors.input('this is an input'));
5959

6060

6161
// console.log('Generic logging theme as file'.green.bold.underline);
6262

6363
// Load a theme from file
64-
colors.setTheme(__dirname + '/../themes/generic-logging.js');
64+
colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));
6565

6666
// outputs red text
6767
console.log(colors.error('this is an error'));

0 commit comments

Comments
 (0)