| | |
| | | |
| | | /** |
| | | * Selects a color for a debug namespace |
| | | * @param {String} namespace The namespace string for the for the debug instance to be colored |
| | | * @param {String} namespace The namespace string for the debug instance to be colored |
| | | * @return {Number|String} An ANSI color code for the given namespace |
| | | * @api private |
| | | */ |
| | |
| | | namespaces = split[i].replace(/\*/g, '.*?'); |
| | | |
| | | if (namespaces[0] === '-') { |
| | | createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); |
| | | createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); |
| | | } else { |
| | | createDebug.names.push(new RegExp('^' + namespaces + '$')); |
| | | } |