fix: Ioutput dates as ISO 8601 strings in JSON Formatter (#313)

kudos to @jacobbaskin
This commit is contained in:
Jacob Baskin 2017-08-01 12:16:17 -04:00 committed by Roman Hotsiy
parent da9df29fdd
commit 86d8179e4f

View File

@ -35,6 +35,8 @@ function valueToHTML(value) {
level++; level++;
output += arrayToHTML(value); output += arrayToHTML(value);
level--; level--;
} else if (value && value.constructor === Date) {
output += decorateWithSpan('"' + value.toISOString() + '"', 'type-string');
} else if (valueType === 'object') { } else if (valueType === 'object') {
level++; level++;
output += objectToHTML(value); output += objectToHTML(value);