Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ribald

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ribald

Ribald is a lightweight and efficient Node.js package designed for detecting vulgar and obscene words within strings. It returns an array containing these offensive terms found in the input string. With its comprehensive list of offensive terms, Ribald em

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-12.5%
Maintainers
1
Weekly downloads
 
Created
Source

Ribald

Ribald is a lightweight and efficient Node.js package designed for detecting vulgar and obscene words within strings. It provides a comprehensive list of offensive terms, allowing developers to filter and moderate user-generated content effectively.

Installation

Install Ribald via npm:

npm install ribald

Usage

Import Ribald into your Node.js application:

javascript :

import ribald from "ribald";

let input = "This is a test string containing vulgar words like fuck, asshole, and slut.";

let detectedWords = ribald(input);

console.log(detectedWords);

This will output an array containing all detected vulgar words from the input string.

Example

import ribald from "ribald";

let input = "This is a test string containing vulgar words like fuck, asshole, and slut.";

let detectedWords = ribald(input);

console.log(detectedWords);

// Output:
{
    "original": "This is a test string containing vulgar words like fuck, asshole, and slut.",
   "words": ["fuck", "asshole", "slut"],
   "count": 3,
   "filter": "This is a test string containing vulgar words like ****, *******, and ****."
} 

List of Words

The package includes a predefined list of vulgar words such as:

  • Fuck
  • Shit
  • Asshole
  • Bitch
  • Cunt
  • ...

Contributing

Contributions to the list of vulgar words or improvements to the package are welcome. Please open an issue or submit a pull request on GitHub

License

This package is licensed under the ISC License.


This package is intended for educational and informational purposes only. Use it responsibly and in accordance with applicable laws and regulations.

Keywords

FAQs

Package last updated on 16 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc