Skip to main content
Module

x/mongoose/types/index.d.ts>mongoose.deleteModel

MongoDB object modeling designed to work in an asynchronous environment.
Go to Latest
function mongoose.deleteModel
import { mongoose } from "https://deno.land/x/mongoose@6.7.5/types/index.d.ts";
const { deleteModel } = mongoose;

Removes the model named name from the default connection, if it exists. You can use this function to clean up any models you created in your tests to prevent OverwriteModelErrors.

Parameters

name: string | RegExp