function enable(namespaces) {
    exports.save(namespaces);
    exports.names = [];
    exports.skips = [];
    var split = (typeof namespaces === 'string' ? 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 + '$'));
    }
}
/**
 * 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);
    exports.names = [];
    exports.skips = [];
    var split = (typeof namespaces === 'string' ? 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 + '$'));
    }
}
function enable ( namespaces ) { exports . save ( namespaces ) ; exports . names = [ ] ; exports . skips = [ ] ; var split = ( typeof namespaces === 'string' ? 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 + '$' ) ) ; } }
Enables a debug mode by namespaces.
Enables a debug mode by namespaces .
// ignore empty strings