no-profanity
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -23,3 +23,4 @@ const { list: baseList } = require("./en.js"); | ||
const matches = []; | ||
const regex = new RegExp(`\\b(${wordList.join("|")})\\b`, "ig"); | ||
const replacedWordList = wordList.map((word) => word.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")); | ||
const regex = new RegExp(`\\b(${replacedWordList.join("|")})\\b`, "ig"); | ||
let match; | ||
@@ -26,0 +27,0 @@ |
{ | ||
"name": "no-profanity", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "A JavaScript package to detect and filter profanity", | ||
@@ -5,0 +5,0 @@ "main": "./lib/no-profanity.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33712
1348