Nondeterministic Postrequisite Metaprotocol
Need private packages and team management tools?Check out npm Teams »

f-ck

1.0.5 • Public • Published

f-ck

Build Coverage Downloads Size

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

Not affiliated with Football Club København.

Install

npm:

npm install f-ck

Use

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

API

fck(value[, character])

fck.vowel(value[, character])

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

fck.inner(value[, character])

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

fck.grawlix(value[, pattern])

Sanitize value using a grawlix pattern (default: '@#$%!&?'). Essentially, repeats pattern for value (when number) / 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

199

Version

1.0.5

License

MIT

Unpacked Size

5.87 kB

Total Files

4

Last publish

Collaborators

  • avatar