| 75243 | var debugObj = Object.assign((namespace) => { |
| 75244 | return createDebugger(namespace); |
| 75245 | }, { |
| 75246 | enable, |
| 75247 | enabled, |
| 75248 | disable, |
| 75249 | log |
| 75250 | }); |
| 75251 | function enable(namespaces) { |
| 75252 | enabledString = namespaces; |
| 75253 | enabledNamespaces = []; |
| 75254 | skippedNamespaces = []; |
| 75255 | const wildcard = /\*/g; |
| 75256 | const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); |
| 75257 | for (const ns of namespaceList) { |
| 75258 | if (ns.startsWith("-")) { |
| 75259 | skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); |
| 75260 | } else { |
| 75261 | enabledNamespaces.push(new RegExp(`^${ns}$`)); |
| 75262 | } |
| 75263 | } |
| 75264 | for (const instance of debuggers) { |