We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52e1f21 commit a45d4a0Copy full SHA for a45d4a0
README.md
@@ -208,6 +208,18 @@ error('now goes to stdout via console.info');
208
log('still goes to stdout, but via console.info now');
209
```
210
211
+## Checking whether a debug target is enabled
212
+
213
+Afer you've created a debug instance, you can check whether it is enabled by its `.enabled` property:
214
215
+```javascript
216
+const debug = require('debug')('http');
217
218
+if(debug.enabled) {
219
+ // ...
220
+}
221
+```
222
223
224
## Authors
225
0 commit comments