f-ck
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.1 • Public • Published

    f-ck

    Build Coverage Downloads Size

    Clean-up cuss (c*ss, c**s, @#$%) words.

    Not affiliated with Football Club København.

    Install

    This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.

    npm:

    npm install f-ck

    Use

    import {vowel, inner, grawlix} = require('f-ck')
    
    console.log(vowel('butt')) // => 'b*tt'
    console.log(inner('butt')) // => 'b**t'
    console.log(grawlix('butt')) // => '@#$%'
    console.log(grawlix(7)) // => '@#$%!&?'
    
    console.log(vowel('butt', '-')) // => 'b-tt'

    API

    This package exports the following identifiers: vowel, inner, and grawlix. There is no default export.

    vowel(value[, character])

    Sanitize value by replacing vowels in value with character (default: '*').

    inner(value[, character])

    Sanitize value by replacing all characters except the first and last in value with character (default: '*').

    grawlix(value[, pattern])

    Sanitize value using a grawlix pattern (default: '@#$%!&?'). Essentially, repeats pattern for value (when number) or value.length (when string) characters.

    Related

    • profanities — List of (possible) English profane words
    • cuss — Map of English profane words to a rating of sureness

    License

    MIT © Titus Wormer

    Install

    npm i f-ck

    DownloadsWeekly Downloads

    1,127

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    6.66 kB

    Total Files

    5

    Last publish

    Collaborators

    • wooorm