|
|
@ -522,15 +522,16 @@ exports.inherits = function(ctor, superCtor) { |
|
|
|
var deprecationWarnings; |
|
|
|
|
|
|
|
exports._deprecationWarning = function(moduleId, message) { |
|
|
|
if (!deprecationWarnings) |
|
|
|
deprecationWarnings = {}; |
|
|
|
else if (message in deprecationWarnings) |
|
|
|
return; |
|
|
|
|
|
|
|
deprecationWarnings[message] = true; |
|
|
|
|
|
|
|
if ((new RegExp('\\b' + moduleId + '\\b')).test(process.env.NODE_DEBUG)) |
|
|
|
if ((new RegExp('\\b' + moduleId + '\\b')).test(process.env.NODE_DEBUG)) { |
|
|
|
console.trace(message); |
|
|
|
else |
|
|
|
} else { |
|
|
|
if (!deprecationWarnings) { |
|
|
|
deprecationWarnings = {}; |
|
|
|
} else if (message in deprecationWarnings) { |
|
|
|
return; |
|
|
|
} |
|
|
|
console.error(message); |
|
|
|
|
|
|
|
deprecationWarnings[message] = true; |
|
|
|
} |
|
|
|
}; |
|
|
|