Model.inspect()

Helper for console.log. Given a model named ‘MyModel’, returns the string 'Model { MyModel }'.

Example:

  1. const MyModel = mongoose.model('Test', Schema({ name: String }));
  2. MyModel.inspect(); // 'Model { Test }'
  3. console.log(MyModel); // Prints 'Model { Test }'