@@ -48,7 +48,7 @@ exports.format = function(f) {
48
48
} ;
49
49
50
50
51
- exports . deprecate = internalUtil . deprecate ;
51
+ exports . deprecate = internalUtil . _deprecate ;
52
52
53
53
54
54
var debugs = { } ;
@@ -730,50 +730,50 @@ function hasOwnProperty(obj, prop) {
730
730
731
731
// Deprecated old stuff.
732
732
733
- exports . p = exports . deprecate ( function ( ) {
733
+ exports . p = internalUtil . deprecate ( function ( ) {
734
734
for ( var i = 0 , len = arguments . length ; i < len ; ++ i ) {
735
735
console . error ( exports . inspect ( arguments [ i ] ) ) ;
736
736
}
737
- } , 'util.p: Use console.error() instead' ) ;
737
+ } , 'util.p is deprecated. Use console.error instead. ' ) ;
738
738
739
739
740
- exports . exec = exports . deprecate ( function ( ) {
740
+ exports . exec = internalUtil . deprecate ( function ( ) {
741
741
return require ( 'child_process' ) . exec . apply ( this , arguments ) ;
742
- } , 'util.exec is now called ` child_process.exec` .' ) ;
742
+ } , 'util.exec is deprecated. Use child_process.exec instead .' ) ;
743
743
744
744
745
- exports . print = exports . deprecate ( function ( ) {
745
+ exports . print = internalUtil . deprecate ( function ( ) {
746
746
for ( var i = 0 , len = arguments . length ; i < len ; ++ i ) {
747
747
process . stdout . write ( String ( arguments [ i ] ) ) ;
748
748
}
749
- } , 'util.print: Use console.log instead' ) ;
749
+ } , 'util.print is deprecated. Use console.log instead. ' ) ;
750
750
751
751
752
- exports . puts = exports . deprecate ( function ( ) {
752
+ exports . puts = internalUtil . deprecate ( function ( ) {
753
753
for ( var i = 0 , len = arguments . length ; i < len ; ++ i ) {
754
754
process . stdout . write ( arguments [ i ] + '\n' ) ;
755
755
}
756
- } , 'util.puts: Use console.log instead' ) ;
756
+ } , 'util.puts is deprecated. Use console.log instead. ' ) ;
757
757
758
758
759
- exports . debug = exports . deprecate ( function ( x ) {
759
+ exports . debug = internalUtil . deprecate ( function ( x ) {
760
760
process . stderr . write ( 'DEBUG: ' + x + '\n' ) ;
761
- } , 'util.debug: Use console.error instead' ) ;
761
+ } , 'util.debug is deprecated. Use console.error instead. ' ) ;
762
762
763
763
764
- exports . error = exports . deprecate ( function ( x ) {
764
+ exports . error = internalUtil . deprecate ( function ( x ) {
765
765
for ( var i = 0 , len = arguments . length ; i < len ; ++ i ) {
766
766
process . stderr . write ( arguments [ i ] + '\n' ) ;
767
767
}
768
- } , 'util.error: Use console.error instead' ) ;
768
+ } , 'util.error is deprecated. Use console.error instead. ' ) ;
769
769
770
770
771
- exports . pump = exports . deprecate ( function ( readStream , writeStream , callback ) {
771
+ exports . pump = internalUtil . deprecate ( function ( readStream , writeStream , cb ) {
772
772
var callbackCalled = false ;
773
773
774
774
function call ( a , b , c ) {
775
- if ( callback && ! callbackCalled ) {
776
- callback ( a , b , c ) ;
775
+ if ( cb && ! callbackCalled ) {
776
+ cb ( a , b , c ) ;
777
777
callbackCalled = true ;
778
778
}
779
779
}
@@ -803,7 +803,7 @@ exports.pump = exports.deprecate(function(readStream, writeStream, callback) {
803
803
readStream . destroy ( ) ;
804
804
call ( err ) ;
805
805
} ) ;
806
- } , 'util.pump(): Use readableStream.pipe() instead' ) ;
806
+ } , 'util.pump is deprecated. Use readableStream.pipe instead. ' ) ;
807
807
808
808
809
809
exports . _errnoException = function ( err , syscall , original ) {
0 commit comments