@@ -31,2 +31,4 @@ "use strict"; | ||
| check(namespace) { | ||
| if (namespace === "") | ||
| return this.parsed.allowed; | ||
| const chain = namespace.split(":").map(part => part.trim()); | ||
@@ -33,0 +35,0 @@ let current = this.parsed; |
+6
-4
@@ -17,2 +17,3 @@ "use strict"; | ||
| exports.namespaces = new namespacing_ts_1.Namespaces(DEBUG); | ||
| const ns = (n) => (n ? n + " " : ""); | ||
| /** | ||
@@ -39,10 +40,11 @@ * Create a debug instance for a namespace. | ||
| function w(namespace = "") { | ||
| const debugfn = (start = "", ...rest) => { | ||
| const debugfn = (...data) => { | ||
| const start = data.length ? data.shift() : ""; | ||
| if (!debugfn.enabled) | ||
| return; | ||
| if (types_ts_1.context.document) | ||
| debugfn.logger(`%c${namespace}%c ${start}`, `color: #${(0, colours_ts_1.selectColour)(namespace)[3]}`, "color: inherit", ...rest); | ||
| debugfn.logger(`%c${ns(namespace)}%c${start}`, `color: #${(0, colours_ts_1.selectColour)(namespace)[3]}`, "color: inherit", ...data); | ||
| else { | ||
| const ns = useColour ? (0, colours_ts_1.colourNs)(namespace) : namespace; | ||
| debugfn.logger(`${ns} ${start}`, ...rest); | ||
| const name = useColour ? (0, colours_ts_1.colourNs)(namespace) : namespace; | ||
| debugfn.logger(ns(name) + start, ...data); | ||
| } | ||
@@ -49,0 +51,0 @@ }; |
+1
-1
| { | ||
| "name": "w", | ||
| "version": "2.2.0", | ||
| "version": "2.2.1", | ||
| "homepage": "https://github.com/feathers-studio/wiretap", | ||
@@ -5,0 +5,0 @@ "repository": { |
10152
1.56%144
2.86%