UNPKG

obscenity

Version:

Robust, extensible profanity filter.

20 lines (19 loc) 718 B
/** * Creates a transformer that maps confusable Unicode characters to their * normalized equivalent. For example, `⓵`, `➊`, and `⑴` become `1` when using * this transformer. * * **Application order** * * It is recommended that this transformer be applied near the start of the * transformer chain. * * @example * ```typescript * const transformer = resolveConfusablesTransformer(); * const matcher = new RegExpMatcher({ ..., blacklistMatcherTransformers: [transformer] }); * ``` * @returns A container holding the transformer, which can then be passed to the * [[RegExpMatcher]]. */ export declare function resolveConfusablesTransformer(): import("../Transformers").SimpleTransformerContainer;