@@ -10,24 +10,18 @@ const kDecoratedPrivateSymbolIndex = binding['decorated_private_symbol'];
1010// `util` module makes it accessible without having to `require('util')` there.
1111exports . customInspectSymbol = Symbol ( 'util.inspect.custom' ) ;
1212
13- // All the internal deprecations have to use this function only, as this will
14- // prepend the prefix to the actual message.
15- exports . deprecate = function ( fn , msg , code ) {
16- return exports . _deprecate ( fn , msg , code ) ;
17- } ;
18-
1913exports . trace = function ( msg ) {
2014 console . trace ( `${ prefix } ${ msg } ` ) ;
2115} ;
2216
2317// Mark that a method should not be used.
2418// Returns a modified function which warns once by default.
2519// If --no-deprecation is set, then it is a no-op.
26- exports . _deprecate = function ( fn , msg , code ) {
20+ exports . deprecate = function deprecate ( fn , msg , code ) {
2721 // Allow for deprecating things in the process of starting up.
2822 if ( global . process === undefined ) {
2923 return function ( ) {
30- return exports . _deprecate ( fn , msg ) . apply ( this , arguments ) ;
24+ return exports . deprecate ( fn , msg , code ) . apply ( this , arguments ) ;
3125 } ;
3226 }
3327
0 commit comments