diff options
author | Wyatt Preul <wpreul@gmail.com> | 2015-08-24 16:53:46 -0500 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2015-11-18 14:28:35 -0800 |
commit | 007cfea30829ec10a9ba690dd8f28d7afe1462a7 (patch) | |
tree | 3b2e5fdbc46b234b8c8653313ad62746da0a673d /lib | |
parent | a2c0aa84e0c1ffc299d8e11eebd8a93688e1f4d3 (diff) | |
download | android-node-v8-007cfea30829ec10a9ba690dd8f28d7afe1462a7.tar.gz android-node-v8-007cfea30829ec10a9ba690dd8f28d7afe1462a7.tar.bz2 android-node-v8-007cfea30829ec10a9ba690dd8f28d7afe1462a7.zip |
util: remove pump
Remove util.pump and associated tests
PR-URL: https://github.com/nodejs/node/pull/2531
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/repl.js | 2 | ||||
-rw-r--r-- | lib/util.js | 38 |
2 files changed, 1 insertions, 39 deletions
diff --git a/lib/repl.js b/lib/repl.js index 87014b5d5d..4485b4016b 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -611,7 +611,7 @@ function filteredOwnPropertyNames(obj) { // // Example: // complete('var foo = util.') -// -> [['util.print', 'util.debug', 'util.log', 'util.inspect', 'util.pump'], +// -> [['util.print', 'util.debug', 'util.log', 'util.inspect'], // 'util.' ] // // Warning: This eval's code like "foo.bar.baz", so it will run property diff --git a/lib/util.js b/lib/util.js index eeeb42a948..0666300d68 100644 --- a/lib/util.js +++ b/lib/util.js @@ -864,44 +864,6 @@ exports.error = internalUtil.deprecate(function(x) { }, 'util.error is deprecated. Use console.error instead.'); -exports.pump = internalUtil.deprecate(function(readStream, writeStream, cb) { - var callbackCalled = false; - - function call(a, b, c) { - if (cb && !callbackCalled) { - cb(a, b, c); - callbackCalled = true; - } - } - - readStream.addListener('data', function(chunk) { - if (writeStream.write(chunk) === false) readStream.pause(); - }); - - writeStream.addListener('drain', function() { - readStream.resume(); - }); - - readStream.addListener('end', function() { - writeStream.end(); - }); - - readStream.addListener('close', function() { - call(); - }); - - readStream.addListener('error', function(err) { - writeStream.end(); - call(err); - }); - - writeStream.addListener('error', function(err) { - readStream.destroy(); - call(err); - }); -}, 'util.pump is deprecated. Use readableStream.pipe instead.'); - - exports._errnoException = function(err, syscall, original) { var errname = uv.errname(err); var message = syscall + ' ' + errname; |