Skip to main content
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@6.7.5/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>