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

bad-words-next

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bad-words-next - npm Package Compare versions

Comparing version 1.3.4 to 1.3.5

85

lib/index.js

@@ -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",

3

package.json
{
"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

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