code: function format (obj, sub) {
      var x = utils.clone(obj);
      if (x) {
          if ('Binary' === x.constructor.name) {
              x = '[object Buffer]';
          } else if ('ObjectID' === x.constructor.name) {
              var representation = 'ObjectId("' + x.toHexString() + '")';
              x = { inspect: function() { return representation; } };
          } else if ('Date' === x.constructor.name) {
              var representation = 'new Date("' + x.toUTCString() + '")';
              x = { inspect: function() { return representation; } };
          } else if ('Object' === x.constructor.name) {
              var keys = Object.keys(x)
                  , i = keys.length
                  , key
              while (i--) {
                  key = keys[i];
                  if (x[key]) {
                      if ('Binary' === x[key].constructor.name) {
                          x[key] = '[object Buffer]';
                      } else if ('Object' === x[key].constructor.name) {
                          x[key] = format(x[key], true);
                      } else if ('ObjectID' === x[key].constructor.name) {
                          ;(function(x){
                              var representation = 'ObjectId("' + x[key].toHexString() + '")';
                              x[key] = { inspect: function() { return representation; } };
                          })(x)
                      } else if ('Date' === x[key].constructor.name) {
                          ;(function(x){
                              var representation = 'new Date("' + x[key].toUTCString() + '")';
                              x[key] = { inspect: function() { return representation; } };
                          })(x)
                      } else if (Array.isArray(x[key])) {
                          x[key] = x[key].map(function (o) {
                              return format(o, true)
                          });
                      }
                  }
              }
          }
          if (sub) return x;
      }
  
      return require('util')
          .inspect(x, false, 10, true)
          .replace(/\n/g, '')
          .replace(/\s{2,}/g, ' ')
  }
docs: /*!
  Debug print helper