Skip to content

wooorm/f-ck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

🤬 Clean-up cuss words

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Contributors 2

  •  
  •