You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

no-profanity

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

no-profanity - npm Package Compare versions

Comparing version

to
1.1.5

lib/en.txt

12

lib/no-profanity.js

@@ -1,5 +0,11 @@

import { ProfanityEngine } from "@coffeeandfun/google-profanity-words";
let profanity = new ProfanityEngine();
const baseList = profanity.all();
import { readFileSync } from "fs";
import { fileURLToPath } from "url";
import path from "path";
const currentFilePath = fileURLToPath(import.meta.url);
const dataPath = path.join(path.dirname(currentFilePath), "en.txt");
const data = readFileSync(dataPath, "utf8");
const baseList = data.split("\n");
/**

@@ -6,0 +12,0 @@ * Checks if the given test string contains any profanities based on the provided arguments.

{
"name": "no-profanity",
"version": "1.1.4",
"version": "1.1.5",
"description": "A JavaScript package to detect and filter profanity",

@@ -37,6 +37,3 @@ "main": "./lib/no-profanity.js",

"node": ">=14.0.0"
},
"dependencies": {
"@coffeeandfun/google-profanity-words": "^1.0.4"
}
}

@@ -11,2 +11,4 @@ # no-profanity

Thanks to [google-profanity-words](https://github.com/coffee-and-fun/google-profanity-words) for providing the list of profanities.
## Usage

@@ -13,0 +15,0 @@ Using the no-profanity package is very simple. You can use it to detect profanity, or to filter profanity from a string. There are some basic options as well, such as overriding the placeholder character, or adding/removing words from the filterlist.