bad-words-next
Advanced tools
Comparing version 2.2.0 to 2.2.1
# Changelog | ||
## [2.2.1](https://github.com/alexzel/bad-words-next/compare/v2.2.0...v2.2.1) (2023-06-21) | ||
### Performance Improvements | ||
* move string comparison out of map ([99bc141](https://github.com/alexzel/bad-words-next/commit/99bc141d81fc2994622a83e93b489a763fc875db)) | ||
## [2.2.0](https://github.com/alexzel/bad-words-next/compare/v2.1.0...v2.2.0) (2023-06-21) | ||
@@ -4,0 +11,0 @@ |
@@ -282,2 +282,3 @@ import { remove } from 'confusables'; | ||
} | ||
var repeat = this.opts.placeholderMode === 'repeat'; | ||
return str.split(/[\b\s]/).map(function (word) { | ||
@@ -288,3 +289,3 @@ if (_this2.check(word)) { | ||
} | ||
if (_this2.opts.placeholderMode === 'repeat') { | ||
if (repeat) { | ||
return _this2.opts.placeholder.repeat(word.length); | ||
@@ -291,0 +292,0 @@ } |
{ | ||
"name": "bad-words-next", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "JavaScript/TypeScript filter and checker for bad words aka profanity", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
59602
1976