@shopmacher/bad-words
Advanced tools
Comparing version 3.0.6 to 3.0.7
@@ -35,3 +35,8 @@ const localList = require('./lang.json').words; | ||
.filter((word) => { | ||
if (string.includes(word)) { | ||
return true; | ||
} | ||
const wordExp = new RegExp(`\\b${word.replace(/(\W)/g, '\\$1')}\\b`, 'gi'); | ||
return !this.exclude.includes(word.toLowerCase()) && wordExp.test(string); | ||
@@ -89,2 +94,2 @@ }) | ||
module.exports = Filter; | ||
module.exports = Filter; |
{ | ||
"name": "@shopmacher/bad-words", | ||
"version": "3.0.6", | ||
"version": "3.0.7", | ||
"description": "A javascript filter for bad words", | ||
@@ -5,0 +5,0 @@ "main": "./lib/badwords", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
143704
8301