bad-words-next
Advanced tools
Comparing version 1.3.4 to 1.3.5
@@ -163,11 +163,3 @@ 'use strict'; | ||
} | ||
/** | ||
* Simple key-value object for homoglyphs conversion | ||
*/ | ||
/** | ||
* Default options object to use in BadWordsNext class contructor | ||
* @type {Object} | ||
*/ | ||
var DEFAULT_OPTIONS = { | ||
@@ -180,42 +172,4 @@ placeholder: '***', | ||
}; | ||
/** | ||
* Main library class implementing profanity filtering and detection | ||
*/ | ||
var BadWordsNext = /*#__PURE__*/function () { | ||
/** | ||
* Options object built from options passed into constructor and default options object | ||
* @private | ||
* @type {InternalOptions} | ||
*/ | ||
/** | ||
* Special chars represented as a string from specialChars regular expression | ||
* @private | ||
* @type {string} | ||
*/ | ||
/** | ||
* Dictionaries ids list | ||
* @private | ||
* @type {string[]} | ||
*/ | ||
/** | ||
* Dictionaries data map with data ID as a key | ||
* @private | ||
* @type {DataMap} | ||
*/ | ||
/** | ||
* Clear memoized check | ||
* @private | ||
* @type {Function} | ||
*/ | ||
/** | ||
* Create an instance of BadWordsNext class | ||
* | ||
* @param {Options} | ||
*/ | ||
var BadWordsNext = function () { | ||
function BadWordsNext(opts) { | ||
@@ -238,9 +192,3 @@ _classCallCheck(this, BadWordsNext); | ||
} | ||
/** | ||
* Add dictionary data for bad words filtering and detection | ||
* | ||
* @param {Data} data Dictionary data | ||
*/ | ||
_createClass(BadWordsNext, [{ | ||
@@ -309,11 +257,2 @@ key: "add", | ||
} | ||
/** | ||
* Prepare a string by replacing dictionary lookalikes and confusables | ||
* | ||
* @private | ||
* @param {string} str input string | ||
* @param {string} id dictionary ID | ||
* @return {string} | ||
*/ | ||
}, { | ||
@@ -344,10 +283,2 @@ key: "prepare", | ||
} | ||
/** | ||
* Create regular expression by dictionary expression string | ||
* | ||
* @private | ||
* @param {string} | ||
* @return {RegExp} | ||
*/ | ||
}, { | ||
@@ -358,9 +289,2 @@ key: "regexp", | ||
} | ||
/** | ||
* Check whether the input string contains bad words or not | ||
* | ||
* @param {string} | ||
* @return {Boolean} | ||
*/ | ||
}, { | ||
@@ -388,9 +312,2 @@ key: "check", | ||
} | ||
/** | ||
* Filter bad words in the input string and replace them with a placeholder | ||
* | ||
* @param {string} | ||
* @return {string} | ||
*/ | ||
}, { | ||
@@ -397,0 +314,0 @@ key: "filter", |
{ | ||
"name": "bad-words-next", | ||
"version": "1.3.4", | ||
"version": "1.3.5", | ||
"description": "JavaScript/TypeScript filter and checker for bad words aka profanity", | ||
@@ -70,2 +70,3 @@ "keywords": [ | ||
"babel": { | ||
"comments": false, | ||
"presets": [ | ||
@@ -72,0 +73,0 @@ "@babel/preset-typescript", |
Sorry, the diff of this file is not supported yet
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
43266
1639