1
0
Fork 0

Workaround for internal.sprintf not handling dates properly.

This commit is contained in:
Alan Plum 2015-04-07 19:55:45 +02:00
parent 3b48230976
commit efe7dba4c1
1 changed files with 3 additions and 0 deletions

View File

@ -118,6 +118,9 @@
else if (arg === null) {
arg = "null";
}
else if (arg instanceof Date || arg instanceof RegExp) {
arg = String(arg);
}
else if (Object.prototype.isPrototypeOf(arg) || Array.isArray(arg)) {
arg = inspect(arg, {prettyPrint: false});
}