3.0.3 • Published 6 months ago
@types/bad-words v3.0.3
Installation
npm install --save @types/bad-words
Summary
This package contains type definitions for bad-words (https://github.com/web-mech/badwords#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bad-words.
index.d.ts
// Type definitions for bad-words 3.0
// Project: https://github.com/web-mech/badwords#readme
// Definitions by: Tom Pridham <https://github.com/TomPridham>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface Options {
emptyList?: boolean | undefined;
exclude?: string[] | undefined;
list?: string[] | undefined;
placeHolder?: string | undefined;
regex?: RegExp | undefined;
replaceRegex?: RegExp | undefined;
splitRegex?: RegExp | undefined;
}
declare class BadWordsFilter {
constructor(options?: Options);
addWords(...words: string[]): void;
clean(text: string): string;
isProfane(text: string): boolean;
removeWords(...words: string[]): void;
replaceWord(text: string): string;
}
export = BadWordsFilter;
Additional Details
- Last updated: Wed, 07 Jul 2021 21:44:49 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Tom Pridham.