@@ -10,24 +10,18 @@ const kDecoratedPrivateSymbolIndex = binding['decorated_private_symbol'];
10
10
// `util` module makes it accessible without having to `require('util')` there.
11
11
exports . customInspectSymbol = Symbol ( 'util.inspect.custom' ) ;
12
12
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
-
19
13
exports . trace = function ( msg ) {
20
14
console . trace ( `${ prefix } ${ msg } ` ) ;
21
15
} ;
22
16
23
17
// Mark that a method should not be used.
24
18
// Returns a modified function which warns once by default.
25
19
// 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 ) {
27
21
// Allow for deprecating things in the process of starting up.
28
22
if ( global . process === undefined ) {
29
23
return function ( ) {
30
- return exports . _deprecate ( fn , msg ) . apply ( this , arguments ) ;
24
+ return exports . deprecate ( fn , msg , code ) . apply ( this , arguments ) ;
31
25
} ;
32
26
}
33
27
0 commit comments