Comparing version 1.3.0 to 1.3.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.promise = exports.cb = exports.namespaces = exports.getLogger = void 0; | ||
const debug = require("debug"); | ||
var debug_1 = require("debug"); | ||
exports.disable = debug_1.disable; | ||
exports.enable = debug_1.enable; | ||
Object.defineProperty(exports, "disable", { enumerable: true, get: function () { return debug_1.disable; } }); | ||
Object.defineProperty(exports, "enable", { enumerable: true, get: function () { return debug_1.enable; } }); | ||
const __namespaces = {}; | ||
@@ -11,2 +12,3 @@ const __loggers = {}; | ||
const d = debug(`${opts.ns}:${type}`); | ||
d.destroy(); // this is to avoid caching forever in debug.instances | ||
if (opts.context) { | ||
@@ -41,2 +43,5 @@ const handler = { | ||
} | ||
for (let i in out) { | ||
out[i].destroy(); // this is to avoid caching forever in debug.instances | ||
} | ||
return out; | ||
@@ -49,5 +54,2 @@ } | ||
out = createLogger(opts); | ||
for (let i in out) { | ||
out[i].destroy(); // this is to avoid caching forever in debug.instances | ||
} | ||
} | ||
@@ -54,0 +56,0 @@ else { |
{ | ||
"name": "debuggo", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "General purpose debug library based on visionmedia/debug", | ||
@@ -17,3 +17,3 @@ "main": "dist/index.js", | ||
"commit": "git-cz", | ||
"check-coverage": "nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100", | ||
"check-coverage": "nyc check-coverage --statements 100 --branches 100 --functions 84 --lines 100", | ||
"report-coverage": "cat ./coverage/lcov.info | coveralls", | ||
@@ -20,0 +20,0 @@ "watch:test": "npm t -- -w", |
7591
108