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 🙏

© 2026 – Pkg Stats / Ryan Hefner

cleanflux-ai

v1.0.0

Published

Official JavaScript SDK for the CleanFlux-AI text cleaning API

Readme

CleanFlux-AI JavaScript SDK

Official JavaScript SDK for the CleanFlux-AI text cleaning and content moderation API.

npm version License: MIT

Features

  • 🧹 Text Cleaning - Remove unwanted content, normalize formatting
  • 🔗 URL Extraction - Extract and validate URLs from text
  • 🤬 Profanity Filter - Remove or mask inappropriate language
  • 📊 Text Metadata - Word count, reading time, and more
  • 📝 Normalization - Whitespace, unicode, and case normalization

Installation

npm install cleanflux-ai

Requirements

  • Node.js 18 or higher (uses native fetch)

Quick Start

import CleanFlux from 'cleanflux-ai';

// Initialize with your API key
const client = new CleanFlux('sk_live_your_api_key');

// Clean some text
const result = await client.clean({
  text: 'Check out   http://spam.com  for FREE stuff!!!',
  options: {
    removeUrls: true,
    normalizeWhitespace: true
  }
});

console.log(result.cleaned);
// Output: 'Check out for FREE stuff!'

API Reference

Constructor

const client = new CleanFlux(apiKey, options);

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | apiKey | string | Yes | Your CleanFlux API key | | options.baseUrl | string | No | Custom API base URL (default: https://api.cleanflux.ai) |

Methods

clean(payload)

Clean text by removing unwanted content and normalizing formatting.

const result = await client.clean({
  text: 'Your text here',
  options: {
    removeUrls: true,
    normalizeWhitespace: true,
    // ... more options
  }
});

normalize(payload)

Normalize text formatting (whitespace, unicode, case, etc.).

const result = await client.normalize({
  text: '  Hello   World  ',
  options: {
    trim: true,
    collapseWhitespace: true
  }
});
// result.normalized = 'Hello World'

extractUrls(payload)

Extract URLs from text.

const result = await client.extractUrls({
  text: 'Visit https://cleanflux.ai and https://github.com'
});
// result.urls = ['https://cleanflux.ai', 'https://github.com']

removeProfanity(payload)

Remove or mask profanity from text.

const result = await client.removeProfanity({
  text: 'Some text with bad words',
  options: {
    replacement: '***'
  }
});

metadata(payload)

Extract metadata from text.

const result = await client.metadata({
  text: 'This is a sample paragraph with several words.'
});
// result.wordCount = 8
// result.readingTime = '1 min'

ping()

Check API connectivity.

const result = await client.ping();
// result.status = 'ok'

Error Handling

The SDK throws descriptive errors for failed requests:

try {
  const result = await client.clean({ text: 'Hello' });
} catch (error) {
  console.error(error.message);   // Human-readable error message
  console.error(error.status);    // HTTP status code
  console.error(error.response);  // Full API response
}

Authentication

Get your API key from the CleanFlux Dashboard.

API keys start with sk_live_ for production use.

Documentation

Full API documentation is available at https://cleanflux.ai/docs.

Support

License

MIT License - see LICENSE for details.


Made with ❤️ by Kyros Groupe Ltd