@types/bad-words
TypeScript icon, indicating that this package has built-in type declarations

3.0.3 • Public • Published

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

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: Mon, 06 Nov 2023 22:41:04 GMT
  • Dependencies: none

Credits

These definitions were written by Tom Pridham.

/@types/bad-words/

    Package Sidebar

    Install

    npm i @types/bad-words

    Weekly Downloads

    37,463

    Version

    3.0.3

    License

    MIT

    Unpacked Size

    3.67 kB

    Total Files

    5

    Last publish

    Collaborators

    • types