Skip to content

Commit

Permalink
document .enabled flag (#465)
Browse files Browse the repository at this point in the history
Was added in #15, should be documented (e.g #423)
  • Loading branch information
timruffles authored and thebigredgeek committed Jun 15, 2017
1 parent 52e1f21 commit a45d4a0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -208,6 +208,18 @@ error('now goes to stdout via console.info');
log('still goes to stdout, but via console.info now');
```

## Checking whether a debug target is enabled

Afer you've created a debug instance, you can check whether it is enabled by its `.enabled` property:

```javascript
const debug = require('debug')('http');

if(debug.enabled) {
// ...
}
```


## Authors

Expand Down

0 comments on commit a45d4a0

Please sign in to comment.