npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

content-guard

v0.3.1

Published

🛡️ Advanced content analysis and moderation system with multi-variant optimization. Features context-aware detection, harassment prevention, and ML-powered toxicity analysis. Pre-1.0 development version.

Readme

ContentGuard v0.3.1

Professional content moderation and spam detection for modern applications.

npm version License: MIT

ContentGuard analyzes text for spam, harassment and malicious patterns. It combines a powerful rule engine with optional machine‑learning plugins to deliver fast and accurate results across many languages.

Installation

npm install content-guard

Quick start

const { ContentGuard } = require('content-guard');
const guard = new ContentGuard('moderate');
const result = await guard.analyze('Hello world');
console.log(result.isSpam);

Key features

  • Multiple presets from lenient to strict
  • Context-aware detection using natural language processing
  • Pluggable rule engine with keyboard spam, sentiment and harassment filters
  • Optional ML plugins for emoji sentiment, cross‑cultural checks and toxicity analysis
  • Unicode confusables normalization to stop obfuscation attacks
  • CLI for batch processing and scripting
  • Lightweight and fast – suitable for serverless environments
  • TypeScript definitions included

v4.5 Variants

ContentGuard v4.5 ships four tuned variants so you can balance speed and accuracy:

| Variant | Accuracy | Avg time | Use case | |---------------|---------:|---------:|------------------------------------------| | v4.5-turbo | ~91% | 0.02ms | Real‑time chat and high‑volume streams | | v4.5-fast | ~91.5% | 0.06ms | API gateways and microservices | | v4.5-balanced | ~93% | 0.25ms | General production deployments (default) | | v4.5-large | ~94% | 1.32ms | Enterprise and critical moderation |

Select a variant when creating an instance or via the CLI.

Plugins and use cases

ContentGuard includes a modular plugin system. Enable only what you need:

| Plugin | Description & typical use case | |-------------------------|----------------------------------------------------------------| | Obscenity | Detects offensive language. Use for community guidelines. | | Sentiment | Scores tone of text. Great for chat analytics. | | Harassment | Flags bullying or hateful phrases. Essential for social apps. | | Social Engineering | Finds phishing or scam attempts. Useful for email filters. | | Keyboard Spam | Identifies random key mashing. Perfect for form submissions. | | Emoji Sentiment | Interprets emoji tone. Adds nuance to sentiment analysis. | | Cross‑Cultural | Checks for culturally sensitive terms. Global deployments. | | ML Toxicity | Machine‑learning based toxicity scoring. Higher accuracy. | | Confusables | Normalizes look‑alike Unicode characters. Prevents obfuscation. |

CLI usage

npx content-guard "Some text" --preset strict --variant fast

See the examples/ folder for integration samples.

Configuration

Each preset can be customized. Review lib/presets and adjust plugin weights, thresholds and preprocessing options to match your needs.

License

ContentGuard is released under the MIT License.


Other languages: Español | Français | 中文