console-class-browser
Advanced tools
+9
-1
@@ -43,3 +43,11 @@ const {Writable} = require("stream") | ||
| log(...text) { | ||
| this.stdout.write(format(...text) + "\n") | ||
| var needFormat = true | ||
| text = text.map(inspectAll) | ||
| this.stdout.write((needFormat ? format(...text) : text.join(" ")) + "\n") | ||
| function inspectAll(value) { | ||
| if(typeof value !== "string") { | ||
| needFormat && (needFormat = false) | ||
| return inspect(value) | ||
| } else return value | ||
| } | ||
| }, | ||
@@ -46,0 +54,0 @@ error(...text) { |
+1
-1
| { | ||
| "name": "console-class-browser", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "description": "This module implements the Node.js `console` module for browser environments.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
+1
-0
@@ -31,2 +31,3 @@ # console-class-browser | ||
| console.countReset("Count") | ||
| console.log({key: "value"}, "Hello", "World") | ||
| console.dir(console, {depth: 0}) | ||
@@ -33,0 +34,0 @@ ``` |
+1
-0
@@ -19,2 +19,3 @@ const console = require(".") | ||
| console.countReset("Count") | ||
| console.log({key: "value"}, "Hello", "World") | ||
| console.dir(console, {depth: 0}) |
Sorry, the diff of this file is not supported yet
12434
2.81%101
9.78%159
0.63%