UNPKG

deep-profanity-filter

Version:

A thorough profanity filter that considers most common circumventions. Works with your custom list of blocked and whitelisted words and phrases. Identifies and/or replaces bad words. Works with *wildcards* at *start and/or end* of words.

18 lines (17 loc) 956 B
/** * Transforms the full input string into so-called 'grawlix' (`%&$#?£@!`) characters. * @param inputString - The text we want to be turned into grawlix characters. * @returns The text, transformed into a mess of `%&$#?£@!` characters. * Simple whitespace will be preserved. */ export declare const grawlix: (inputString: string) => string; /** * Replaces the full input strings with a repetition of the replacement character, but preserves * simple whitespace. * @param inputString - The text that we want to replace with the replacement character. * @param replacementCharacter - The character that we want to replace it with. If a string of * `length > 1` is provided, it will only use the first character. * @returns The text, transformed into a repetition of the replacement character, but with * simple whitespaces being preserved. */ export declare const replaceChars: (inputString: string, replacementCharacter: string) => string;