debug.disable('*');
debug.enable('foo');
assert.not(debug.enabled('bar'));
assert.not(debug.enabled('bar*')); // throws; returns true
Has to be solved in two ways:
- More stringent checks on namespaces (as they shouldn't contain asterisks)
- Remove the check for
ns[ns.length-1]==='*', which makes absolutely no sense