Use more color in the repl, loosely inspired by TextMate's SunBurst theme
This commit is contained in:
Родитель
c4f8f871c9
Коммит
8c6a7b5de4
10
lib/util.js
10
lib/util.js
|
@ -59,15 +59,15 @@ exports.inspect = function(obj, showHidden, depth, colors) {
|
|||
'yellow' : [33, 39] };
|
||||
|
||||
var style =
|
||||
{ 'special': 'grey',
|
||||
{ 'special': 'cyan',
|
||||
'number': 'blue',
|
||||
'boolean': 'blue',
|
||||
'undefined': 'red',
|
||||
'null': 'red',
|
||||
'boolean': 'yellow',
|
||||
'undefined': 'grey',
|
||||
'null': 'bold',
|
||||
'string': 'green',
|
||||
'date': 'magenta',
|
||||
// "name": intentionally not styling
|
||||
'regexp': 'cyan' }[styleType];
|
||||
'regexp': 'red' }[styleType];
|
||||
|
||||
if (style) {
|
||||
return '\033[' + styles[style][0] + 'm' + str +
|
||||
|
|
Загрузка…
Ссылка в новой задаче