util: mark util.pump() as deprecated
This commit is contained in:
parent
74d076caf1
commit
3219616f43
@ -170,7 +170,7 @@ Returns `true` if the given "object" is an `Error`. `false` otherwise.
|
|||||||
|
|
||||||
## util.pump(readableStream, writableStream, [callback])
|
## util.pump(readableStream, writableStream, [callback])
|
||||||
|
|
||||||
Experimental
|
**Deprecated**
|
||||||
|
|
||||||
Read the data from `readableStream` and send it to the `writableStream`.
|
Read the data from `readableStream` and send it to the `writableStream`.
|
||||||
When `writableStream.write(data)` returns `false` `readableStream` will be
|
When `writableStream.write(data)` returns `false` `readableStream` will be
|
||||||
|
@ -482,7 +482,7 @@ exports.exec = exports.deprecate(function() {
|
|||||||
}, 'util.exec is now called `child_process.exec`.');
|
}, 'util.exec is now called `child_process.exec`.');
|
||||||
|
|
||||||
|
|
||||||
exports.pump = function(readStream, writeStream, callback) {
|
function pump(readStream, writeStream, callback) {
|
||||||
var callbackCalled = false;
|
var callbackCalled = false;
|
||||||
|
|
||||||
function call(a, b, c) {
|
function call(a, b, c) {
|
||||||
@ -517,7 +517,9 @@ exports.pump = function(readStream, writeStream, callback) {
|
|||||||
readStream.destroy();
|
readStream.destroy();
|
||||||
call(err);
|
call(err);
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
exports.pump = exports.deprecate(pump,
|
||||||
|
'util.pump() is deprecated. Use ReadableStream.prototype.pump() instead.');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user