debug-logfmt 1.4.0 → 1.4.2

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "debug-logfmt",
3
3
  "description": "debug module using logfmt format",
4
4
  "homepage": "https://github.com/Kikobeats/debug-logfmt",
5
- "version": "1.4.0",
5
+ "version": "1.4.2",
6
6
  "types": "./src/index.d.ts",
7
7
  "main": "src/index.js",
8
8
  "exports": {
@@ -40,7 +40,7 @@
40
40
  ],
41
41
  "dependencies": {
42
42
  "@kikobeats/time-span": "~1.0.5",
43
- "debug-fabulous": "~2.0.8",
43
+ "null-prototype-object": "~1.2.2",
44
44
  "pretty-ms": "~7.0.1"
45
45
  },
46
46
  "devDependencies": {
package/src/index.js CHANGED
@@ -23,7 +23,7 @@ if (process.env.DEBUG_COLORS === 'false') {
23
23
  }
24
24
  }
25
25
 
26
- const createDebug = require('debug-fabulous')(origDebug)
26
+ const createDebug = require('./lazy')(origDebug)
27
27
 
28
28
  const LEVELS = ['info', 'warn', 'error']
29
29
 
package/src/lazy.js ADDED
@@ -0,0 +1,7 @@
1
+ 'use strict'
2
+
3
+ const NullProtoObj = require('null-prototype-object')
4
+
5
+ const cache = new NullProtoObj()
6
+
7
+ module.exports = ctx => namespace => cache[namespace] || (cache[namespace] = ctx(namespace))