1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.noopDebug = noopDebug;
|
4 | exports.setDebug = setDebug;
|
5 | exports.createDebug = createDebug;
|
6 | const debuggers = {};
|
7 | function noopDebug() {
|
8 | return function () { };
|
9 | }
|
10 | let defaultInitializer = noopDebug;
|
11 | function setDebug(debug) {
|
12 | defaultInitializer = debug;
|
13 | Object.keys(debuggers).forEach((name) => {
|
14 | debuggers[name] = debug(name);
|
15 | });
|
16 | }
|
17 | function createDebug(name) {
|
18 | if (!debuggers[name]) {
|
19 | debuggers[name] = defaultInitializer(name);
|
20 | }
|
21 | return (...args) => debuggers[name](...args);
|
22 | }
|
23 |
|
\ | No newline at end of file |