Comparing version 1.6.0 to 1.6.1
@@ -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) |
@@ -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')); | ||
}); | ||
}); | ||
}); |
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
22163
654