Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

MongoDB object modeling designed to work in an asynchronous environment.
Latest
function mongoose.deleteModel
import { mongoose } from "https://deno.land/x/mongoose@6.13.4/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