-
Notifications
You must be signed in to change notification settings - Fork 964
Closed
Description
By setting this value to the DEBUG environment variable, it generates an exception that can only be catched like this:
try {
const debug = require('debug');
} catch (e) {
console.log('Invalid DEBUG environment value');
}this seems like an anti-pattern to me, so maybe .enable() should handle the exceptions in the RegExp construction and just not set any value in DEBUG.
is this expected behaviour?
Metadata
Metadata
Assignees
Labels
No labels