curse-filter
Version:
JavaScript/Typescript multi-language curse word filter
10 lines (9 loc) • 409 B
TypeScript
import { Request, Response, NextFunction } from 'express';
/**
* Middleware to detect curse words in `req.body`.
*
* On profanity detection (in any string of the body object), it sends a response with the error message and the error code.
*
* For configuration, see {@link MiddlewaresConfig}.
*/
export declare const detectMiddleware: (req: Request, res: Response, next: NextFunction) => Promise<void>;