function enable(namespaces) {
  exports.save(namespaces);

  var split = (namespaces || '').split(/[\s,]+/);
  var len = split.length;

  for (var i = 0; i < len; i++) {
    if (!split[i]) continue; // ignore empty strings
    namespaces = split[i].replace(/\*/g, '.*?');
    if (namespaces[0] === '-') {
      exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
    } else {
      exports.names.push(new RegExp('^' + namespaces + '$'));
      loggerEventBus.emit('enable', split[i]);
    }
  }
}
/**
 * Enables a debug mode by namespaces. This can include modes
 * separated by a colon and wildcards.
 *
 * @param {String} namespaces
 * @api public
 */
Enables a debug mode by namespaces. This can include modes
separated by a colon and wildcards.

@param {String} namespaces
@api public
Enables a debug mode by namespaces . This can include modes separated by a colon and wildcards . @param { String } namespaces @api public
function enable(namespaces) {
  exports.save(namespaces);
  var split = (namespaces || '').split(/[\s,]+/);
  var len = split.length;
  for (var i = 0; i < len; i++) {
    if (!split[i]) continue; 
    namespaces = split[i].replace(/\*/g, '.*?');
    if (namespaces[0] === '-') {
      exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
    } else {
      exports.names.push(new RegExp('^' + namespaces + '$'));
      loggerEventBus.emit('enable', split[i]);
    }
  }
}
function enable ( namespaces ) { exports . save ( namespaces ) ; var split = ( namespaces || '' ) . split ( / [\s,]+ / ) ; var len = split . length ; for ( var i = 0 ; i < len ; i ++ ) { if ( ! split [ i ] ) continue ; namespaces = split [ i ] . replace ( / \* / g , '.*?' ) ; if ( namespaces [ 0 ] === '-' ) { exports . skips . push ( new RegExp ( '^' + namespaces . substr ( 1 ) + '$' ) ) ; } else { exports . names . push ( new RegExp ( '^' + namespaces + '$' ) ) ; loggerEventBus . emit ( 'enable' , split [ i ] ) ; } } }
Enables a debug mode by namespaces.
Enables a debug mode by namespaces .
// ignore empty strings