Skip to content

Commit

Permalink
document .enabled flag
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 committed Jun 5, 2017
1 parent 52e1f21 commit 34b7e56
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');

This comment has been minimized.

Copy link
@P0637

P0637 Sep 25, 2019

Console info via stdout

```

## Checking whether a debug target is enabled

This comment has been minimized.

Copy link
@P0637

P0637 Sep 25, 2019

Debug target check target


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

This comment has been minimized.

Copy link
@P0637

P0637 Sep 25, 2019

Enable property JavaScript

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

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


## Authors

Expand Down

0 comments on commit 34b7e56

Please sign in to comment.