fxxk
v0.1.0
Published
A tiny, extremely fast profanity masker for strings.
Maintainers
Readme
fxxk
fxxk is a tiny TypeScript library for very fast profanity masking.
It is intentionally minimal so you can easily swap out internals later while keeping the npm package structure stable.
Install
npm i fxxkUsage
import { fxxk, containsFxxk } from "fxxk";
fxxk("This is fucking fast.");
// "This is fucking fast." (default words are exact token matches)
fxxk("shit happens");
// "xxxx happens"
containsFxxk("what the shit");
// trueAPI
fxxk(input: string, options?: { words?: readonly string[] }): stringcontainsFxxk(input: string, options?: { words?: readonly string[] }): boolean
Use options.words to provide your own profanity dictionary.
Development (Bun)
bun install
bun run check
bun run buildPublish to npm
- Set npm token in env:
# PowerShell
$env:NPM_TOKEN = "your_token_here"- Build and publish:
bun run prepublishOnly
npm publish --access publicThis repo uses .npmrc with ${NPM_TOKEN} so raw secrets are not committed.
