Noncollinear Perpendicular Microcrystalline

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

    3.0.1 • 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

    // 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.

    Keywords

    none

    Install

    npm i @types/bad-words

    DownloadsWeekly Downloads

    25,988

    Version

    3.0.1

    License

    MIT

    Unpacked Size

    4.14 kB

    Total Files

    4

    Last publish

    Collaborators

    • types