return ctx.stylize('[Function' + name + ']', 'special');
}
if (isRegExp(value)) {
- return ctx.stylize('' + value, 'regexp');
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
}
if (isDate(value)) {
- return ctx.stylize(value.toUTCString(), 'date');
+ return ctx.stylize(Date.prototype.toUTCString.call(value), 'date');
}
if (isError(value)) {
return formatError(value);
// Make RegExps say that they are RegExps
if (isRegExp(value)) {
- base = ' ' + value;
+ base = ' ' + RegExp.prototype.toString.call(value);
}
// Make dates with properties first say the date
if (isDate(value)) {
- base = ' ' + value.toUTCString();
+ base = ' ' + Date.prototype.toUTCString.call(value);
}
// Make error with message first say the error
if (recurseTimes < 0) {
if (isRegExp(value)) {
- return ctx.stylize('' + value, 'regexp');
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
} else {
return ctx.stylize('[Object]', 'special');
}