Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

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

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

Sanitizes query filters against query selector injection attacks by wrapping any nested objects that have a property whose name starts with $ in a $eq.

Parameters

filter: FilterQuery<T>

Returns

FilterQuery<T>