0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

Deprecate sys.p()

This commit is contained in:
Ryan Dahl 2010-05-20 10:12:05 -07:00
parent 44ad6a7db2
commit 022c083848

View File

@ -182,7 +182,13 @@ exports.inspect = function (obj, showHidden, depth) {
return format(obj, (typeof depth === 'undefined' ? 2 : depth));
};
var pWarning;
exports.p = function () {
if (!pWarning) {
pWarning = "sys.p will be removed in future versions of Node. Use sys.puts(sys.inspect()) instead.\n";
exports.error(pWarning);
}
for (var i = 0, len = arguments.length; i < len; ++i) {
error(exports.inspect(arguments[i]));
}