Skip to content

Commit

Permalink
fix: remove withoutEnv default allow-all
Browse files Browse the repository at this point in the history
  • Loading branch information
Qu4k committed Sep 12, 2020
1 parent 1acbdd5 commit 32622f2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ for (let i = 0; i < 5; i++) {
}
```

```
$ DEBUG=worker deno run --allow-env script.ts
```

## Maintainers

- Filippo Rossi ([@qu4k](https://github.com/qu4k))
Expand Down
2 changes: 1 addition & 1 deletion debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function extract(opts?: string): RegExp[] {
let manager: DebugManager;

export function withoutEnv(enabled?: RegExp[] | string) {
if (!enabled) enabled = [/.+/];
if (!enabled) enabled = [];
if (typeof enabled === "string") enabled = extract(enabled);
manager = new DebugManager(enabled);
}
Expand Down
2 changes: 1 addition & 1 deletion example/hello.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const logA = debug("worker:a");
const logB = debug("worker:b");
const logC = debug("service");

// logC.self.enabled = true;
logC.self.enabled = true;

for (let i = 0; i < 5; i++) {
logA("Hello World");
Expand Down

0 comments on commit 32622f2

Please sign in to comment.