yves 1.0.77 → 1.0.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.tm_properties +0 -4
- package/dist/yves.js +15 -2
- package/package.json +2 -2
package/.tm_properties
CHANGED
package/dist/yves.js
CHANGED
|
@@ -2241,7 +2241,7 @@ function setup(env) {
|
|
|
2241
2241
|
|
|
2242
2242
|
/**
|
|
2243
2243
|
* Selects a color for a debug namespace
|
|
2244
|
-
* @param {String} namespace The namespace string for the
|
|
2244
|
+
* @param {String} namespace The namespace string for the debug instance to be colored
|
|
2245
2245
|
* @return {Number|String} An ANSI color code for the given namespace
|
|
2246
2246
|
* @api private
|
|
2247
2247
|
*/
|
|
@@ -2267,6 +2267,8 @@ function setup(env) {
|
|
|
2267
2267
|
function createDebug(namespace) {
|
|
2268
2268
|
let prevTime;
|
|
2269
2269
|
let enableOverride = null;
|
|
2270
|
+
let namespacesCache;
|
|
2271
|
+
let enabledCache;
|
|
2270
2272
|
|
|
2271
2273
|
function debug(...args) {
|
|
2272
2274
|
// Disabled?
|
|
@@ -2327,7 +2329,17 @@ function setup(env) {
|
|
|
2327
2329
|
Object.defineProperty(debug, 'enabled', {
|
|
2328
2330
|
enumerable: true,
|
|
2329
2331
|
configurable: false,
|
|
2330
|
-
get: () =>
|
|
2332
|
+
get: () => {
|
|
2333
|
+
if (enableOverride !== null) {
|
|
2334
|
+
return enableOverride;
|
|
2335
|
+
}
|
|
2336
|
+
if (namespacesCache !== createDebug.namespaces) {
|
|
2337
|
+
namespacesCache = createDebug.namespaces;
|
|
2338
|
+
enabledCache = createDebug.enabled(namespace);
|
|
2339
|
+
}
|
|
2340
|
+
|
|
2341
|
+
return enabledCache;
|
|
2342
|
+
},
|
|
2331
2343
|
set: v => {
|
|
2332
2344
|
enableOverride = v;
|
|
2333
2345
|
}
|
|
@@ -2356,6 +2368,7 @@ function setup(env) {
|
|
|
2356
2368
|
*/
|
|
2357
2369
|
function enable(namespaces) {
|
|
2358
2370
|
createDebug.save(namespaces);
|
|
2371
|
+
createDebug.namespaces = namespaces;
|
|
2359
2372
|
|
|
2360
2373
|
createDebug.names = [];
|
|
2361
2374
|
createDebug.skips = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yves",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.81",
|
|
4
4
|
"description": "a customizable value inspector",
|
|
5
5
|
"url": "http://github.com/jorisroling/yves",
|
|
6
6
|
"repository": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"node": "> 0.1.90"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"debug": "^4.3.
|
|
42
|
+
"debug": "^4.3.3",
|
|
43
43
|
"deep-sort-object": "^1.0.2",
|
|
44
44
|
"pkginfo": "^0.4.1",
|
|
45
45
|
"supports-color": "^8.1.1"
|