Skip to content

Commit 4086ab8

Browse files
save file
1 parent 7d31d93 commit 4086ab8

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

utils/editors/js-console/html/output-console/output-console.html

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -740,35 +740,30 @@
740740
switch (typeof val) {
741741

742742
case 'number': return String(val);
743-
case 'string': return `"${val}"`;
743+
case 'string': return val;
744744
case 'boolean': return String(val);
745745
case 'bigint': return val.toString() + 'n';
746746
case 'symbol': return val.toString();
747747
case 'function': return `[Function${val.name ? ': ' + val.name : ''}]`;
748748

749749
}//switch
750750

751-
// Arrays
752751
if (Array.isArray(val)) {
753752
return '[' + val.map(v => fn(v, seen)).join(', ') + ']';
754753
}
755754

756-
// Date
757755
if (val instanceof Date) {
758756
return `Date("${val.toISOString()}")`;
759757
}
760758

761-
// RegExp
762759
if (val instanceof RegExp) {
763760
return val.toString();
764761
}
765762

766-
// Error objects
767763
if (val instanceof Error) {
768764
return `${val.name}: ${val.message}`;
769765
}
770766

771-
// Map
772767
if (val instanceof Map) {
773768
const entries = [];
774769
for (const [k, v] of val.entries()) {
@@ -777,18 +772,15 @@
777772
return `Map { ${entries.join(', ')} }`;
778773
}
779774

780-
// Set
781775
if (val instanceof Set) {
782776
const entries = [...val].map(v => fn(v, seen));
783777
return `Set { ${entries.join(', ')} }`;
784778
}
785779

786-
// Typed arrays
787780
if (ArrayBuffer.isView(val) && !(val instanceof DataView)) {
788781
return `${val.constructor.name} [ ${Array.from(val).join(', ')} ]`;
789782
}
790783

791-
// DOM nodes
792784
if (val instanceof Node) {
793785
if (val.nodeType === 1) {
794786
return `<${val.tagName.toLowerCase()}>`;
@@ -816,7 +808,7 @@
816808

817809
}//catch
818810

819-
}
811+
}//fn
820812

821813

822814

0 commit comments

Comments
 (0)