Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.js')
-rw-r--r--lib/util.js34
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/util.js b/lib/util.js
index 50f1e1b5313..89017450e02 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -48,7 +48,7 @@ exports.format = function(f) {
};
-exports.deprecate = internalUtil.deprecate;
+exports.deprecate = internalUtil._deprecate;
var debugs = {};
@@ -730,50 +730,50 @@ function hasOwnProperty(obj, prop) {
// Deprecated old stuff.
-exports.p = exports.deprecate(function() {
+exports.p = internalUtil.deprecate(function() {
for (var i = 0, len = arguments.length; i < len; ++i) {
console.error(exports.inspect(arguments[i]));
}
-}, 'util.p: Use console.error() instead');
+}, 'util.p is deprecated. Use console.error instead.');
-exports.exec = exports.deprecate(function() {
+exports.exec = internalUtil.deprecate(function() {
return require('child_process').exec.apply(this, arguments);
-}, 'util.exec is now called `child_process.exec`.');
+}, 'util.exec is deprecated. Use child_process.exec instead.');
-exports.print = exports.deprecate(function() {
+exports.print = internalUtil.deprecate(function() {
for (var i = 0, len = arguments.length; i < len; ++i) {
process.stdout.write(String(arguments[i]));
}
-}, 'util.print: Use console.log instead');
+}, 'util.print is deprecated. Use console.log instead.');
-exports.puts = exports.deprecate(function() {
+exports.puts = internalUtil.deprecate(function() {
for (var i = 0, len = arguments.length; i < len; ++i) {
process.stdout.write(arguments[i] + '\n');
}
-}, 'util.puts: Use console.log instead');
+}, 'util.puts is deprecated. Use console.log instead.');
-exports.debug = exports.deprecate(function(x) {
+exports.debug = internalUtil.deprecate(function(x) {
process.stderr.write('DEBUG: ' + x + '\n');
-}, 'util.debug: Use console.error instead');
+}, 'util.debug is deprecated. Use console.error instead.');
-exports.error = exports.deprecate(function(x) {
+exports.error = internalUtil.deprecate(function(x) {
for (var i = 0, len = arguments.length; i < len; ++i) {
process.stderr.write(arguments[i] + '\n');
}
-}, 'util.error: Use console.error instead');
+}, 'util.error is deprecated. Use console.error instead.');
-exports.pump = exports.deprecate(function(readStream, writeStream, callback) {
+exports.pump = internalUtil.deprecate(function(readStream, writeStream, cb) {
var callbackCalled = false;
function call(a, b, c) {
- if (callback && !callbackCalled) {
- callback(a, b, c);
+ if (cb && !callbackCalled) {
+ cb(a, b, c);
callbackCalled = true;
}
}
@@ -803,7 +803,7 @@ exports.pump = exports.deprecate(function(readStream, writeStream, callback) {
readStream.destroy();
call(err);
});
-}, 'util.pump(): Use readableStream.pipe() instead');
+}, 'util.pump is deprecated. Use readableStream.pipe instead.');
exports._errnoException = function(err, syscall, original) {