File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 1+ // Custom inspect property name / symbol. 
2+ var  inspect  =  'inspect' ; 
3+ 
14/** 
25 * Machine id. 
36 * 
@@ -13,7 +16,10 @@ var checkForHexRegExp = new RegExp('^[0-9a-fA-F]{24}$');
1316
1417// Check if buffer exists 
1518try  { 
16-   if  ( Buffer  &&  Buffer . from )  var  hasBufferType  =  true ; 
19+   if  ( Buffer  &&  Buffer . from )  { 
20+     var  hasBufferType  =  true ; 
21+     inspect  =  require ( 'util' ) . inspect . custom  ||  'inspect' ; 
22+   } 
1723}  catch  ( err )  { 
1824  hasBufferType  =  false ; 
1925} 
@@ -196,7 +202,7 @@ ObjectID.prototype.toString = function(format) {
196202* @return  {String } return the 24 byte hex string representation. 
197203* @ignore  
198204*/ 
199- ObjectID . prototype . inspect  =  ObjectID . prototype . toString ; 
205+ ObjectID . prototype [ inspect ]  =  ObjectID . prototype . toString ; 
200206
201207/** 
202208* Converts to its JSON representation. 
Original file line number Diff line number Diff line change 1+ // Custom inspect property name / symbol. 
2+ var  inspect  =  Buffer  ? require ( 'util' ) . inspect . custom  ||  'inspect'  : 'inspect' ; 
3+ 
14/** 
25 * A class representation of the BSON Symbol type. 
36 * 
@@ -32,7 +35,7 @@ Symbol.prototype.toString = function() {
3235/** 
3336 * @ignore  
3437 */ 
35- Symbol . prototype . inspect  =  function ( )  { 
38+ Symbol . prototype [ inspect ]  =  function ( )  { 
3639  return  this . value ; 
3740} ; 
3841
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments