Comparing version 4.3.1 to 4.3.2
{ | ||
"name": "debug", | ||
"version": "4.3.1", | ||
"version": "4.3.2", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -63,2 +63,4 @@ | ||
let enableOverride = null; | ||
let namespacesCache; | ||
let enabledCache; | ||
@@ -124,3 +126,13 @@ function debug(...args) { | ||
configurable: false, | ||
get: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride, | ||
get: () => { | ||
if (enableOverride !== null) { | ||
return enableOverride; | ||
} | ||
if (namespacesCache !== createDebug.namespaces) { | ||
namespacesCache = createDebug.namespaces; | ||
enabledCache = createDebug.enabled(namespace); | ||
} | ||
return enabledCache; | ||
}, | ||
set: v => { | ||
@@ -154,2 +166,3 @@ enableOverride = v; | ||
createDebug.save(namespaces); | ||
createDebug.namespaces = namespaces; | ||
@@ -156,0 +169,0 @@ createDebug.names = []; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41341
714