JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 422
  • Score
    100M100P100Q95350F
  • License MIT

Clean-up cuss words

Package Exports

  • f-ck

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (f-ck) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.

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

License

MIT © Titus Wormer