UNPKG

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