curse-filter
Version:
JavaScript/Typescript multi-language curse word filter
14 lines (13 loc) • 523 B
TypeScript
import { DetectOptions } from './utils.js';
/**
* *Async version* of `detect()` function. Detects profanity in a string.
* @param str String to detect profanity in
* @param options Options for detection
* @returns `true` if profanity is detected, otherwise `false`
* @example
* // in async scope
* await detect('Fuck you') // true
* await detect('Fuckyou') // false
* await detect('Fuckyou', { rigidMode: true }) // true
*/
export declare const detect: (str: string, options?: DetectOptions) => Promise<boolean>;