|
|
@ -407,18 +407,12 @@ function objectToString(o) { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var pWarning; |
|
|
|
|
|
|
|
exports.p = function() { |
|
|
|
if (!pWarning) { |
|
|
|
pWarning = 'util.p will be removed in future versions of Node. ' + |
|
|
|
'Use util.puts(util.inspect()) instead.\n'; |
|
|
|
exports.error(pWarning); |
|
|
|
} |
|
|
|
for (var i = 0, len = arguments.length; i < len; ++i) { |
|
|
|
error(exports.inspect(arguments[i])); |
|
|
|
} |
|
|
|
}; |
|
|
|
module.deprecate('p', 'Use `util.puts(util.inspect())` instead.'); |
|
|
|
|
|
|
|
|
|
|
|
function pad(n) { |
|
|
@ -444,15 +438,10 @@ exports.log = function(msg) { |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var execWarning; |
|
|
|
exports.exec = function() { |
|
|
|
if (!execWarning) { |
|
|
|
execWarning = 'util.exec has moved to the "child_process" module.' + |
|
|
|
' Please update your source code.'; |
|
|
|
error(execWarning); |
|
|
|
} |
|
|
|
return require('child_process').exec.apply(this, arguments); |
|
|
|
}; |
|
|
|
module.deprecate('exec', 'It is now called `child_process.exec`.'); |
|
|
|
|
|
|
|
|
|
|
|
exports.pump = function(readStream, writeStream, callback) { |
|
|
@ -517,19 +506,3 @@ 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)) |
|
|
|
console.trace(message); |
|
|
|
else |
|
|
|
console.error(message); |
|
|
|
}; |
|
|
|