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

bad-words

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bad-words - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="1.6.1"></a>
## [1.6.1](https://github.com/web-mech/badwords/compare/v1.6.0...v1.6.1) (2017-10-25)
### Bug Fixes
* **isProfaneLike:** fix case sensitive checks within list ([bfa05ce](https://github.com/web-mech/badwords/commit/bfa05ce))
<a name="1.6.0"></a>

@@ -7,0 +17,0 @@ # [1.6.0](https://github.com/web-mech/badwords/compare/v1.5.2...v1.6.0) (2017-10-16)

7

lib/badwords.js

@@ -33,6 +33,3 @@ var localList = require('./lang.json').words;

}, this)
.map(this.isProfaneLike, this)
.filter(function(profane) {
return profane;
})
.filter(this.isProfaneLike, this)
.shift() || false;

@@ -48,3 +45,3 @@ };

.map(function(w) {
return new RegExp(w.replace(/(\W)/g, '\\$1'));
return new RegExp(w.replace(/(\W)/g, '\\$1'), 'gi');
}, this)

@@ -51,0 +48,0 @@ .reduce(function(outcome, wordExp) {

{
"name": "bad-words",
"version": "1.6.0",
"version": "1.6.1",
"description": "A javascript filter for bad words",

@@ -5,0 +5,0 @@ "main": "./lib/badwords",

@@ -27,3 +27,10 @@ require('assert');

});
it('Should detect filtered words regardless of type case', function() {
var filter = new Filter({
list: ['Test']
});
assert(filter.isProfane('test'));
});
});
});
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