New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bad-words-next

Package Overview
Dependencies
Maintainers
1
Versions
58
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.6 to 1.3.7

40

lib/index.js

@@ -42,3 +42,3 @@ 'use strict';

if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
}

@@ -55,2 +55,3 @@ }

function _defineProperty(obj, key, value) {
key = _toPropertyKey(key);
if (key in obj) {

@@ -132,2 +133,16 @@ Object.defineProperty(obj, key, {

}
function _toPrimitive(input, hint) {
if (typeof input !== "object" || input === null) return input;
var prim = input[Symbol.toPrimitive];
if (prim !== undefined) {
var res = prim.call(input, hint || "default");
if (typeof res !== "object") return res;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (hint === "string" ? String : Number)(input);
}
function _toPropertyKey(arg) {
var key = _toPrimitive(arg, "string");
return typeof key === "symbol" ? key : String(key);
}

@@ -146,3 +161,2 @@ /**

}
var DEFAULT_OPTIONS = {

@@ -155,5 +169,3 @@ placeholder: '***',

};
var BadWordsNext = function () {
function BadWordsNext(opts) {

@@ -174,7 +186,5 @@ _classCallCheck(this, BadWordsNext);

}
_createClass(BadWordsNext, [{
key: "add",
value:
function add(data) {
value: function add(data) {
this.clear();

@@ -229,7 +239,5 @@ var regexp = '';

}
}, {
key: "prepare",
value:
function prepare(str, id) {
value: function prepare(str, id) {
var _this = this;

@@ -251,14 +259,10 @@ var s = str;

}
}, {
key: "regexp",
value:
function regexp(expr) {
value: function regexp(expr) {
return new RegExp("(?:^|\\b|\\s)(?:".concat(this.specialChars, ")*(?:").concat(expr, ")(?:").concat(this.specialChars, ")*(?:$|\\b|\\s)"), 'i');
}
}, {
key: "check",
value:
function check(str) {
value: function check(str) {
var _iterator3 = _createForOfIteratorHelper(this.ids),

@@ -280,7 +284,5 @@ _step3;

}
}, {
key: "filter",
value:
function filter(str) {
value: function filter(str) {
var _this2 = this;

@@ -287,0 +289,0 @@ if (str === '' || this.check(str) === false) return str;

{
"name": "bad-words-next",
"version": "1.3.6",
"version": "1.3.7",
"description": "JavaScript/TypeScript filter and checker for bad words aka profanity",

@@ -42,28 +42,28 @@ "keywords": [

"devDependencies": {
"@babel/core": "^7.19.6",
"@babel/plugin-transform-typescript": "^7.19.3",
"@babel/preset-env": "^7.19.4",
"@babel/core": "^7.20.12",
"@babel/plugin-transform-typescript": "^7.20.7",
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.18.6",
"@rollup/plugin-babel": "^5.3.1",
"@types/jest": "^29.2.0",
"@typescript-eslint/eslint-plugin": "^5.41.0",
"@typescript-eslint/parser": "^5.41.0",
"eslint": "^8.26.0",
"@types/jest": "^29.2.5",
"@typescript-eslint/eslint-plugin": "^5.48.0",
"@typescript-eslint/parser": "^5.48.0",
"eslint": "^8.31.0",
"eslint-config-standard-with-typescript": "^23.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.3.0",
"eslint-plugin-n": "^15.6.0",
"eslint-plugin-promise": "^6.1.1",
"jest": "^29.2.2",
"jest": "^29.3.1",
"rollup": "^2.79.1",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-dts": "^4.2.3",
"typedoc": "^0.23.18",
"typedoc": "^0.23.23",
"typedoc-github-wiki-theme": "^1.0.1",
"typedoc-plugin-markdown": "^3.13.6",
"typedoc-plugin-markdown": "^3.14.0",
"typedoc-plugin-rename-defaults": "^0.6.4",
"typescript": "^4.8.4"
"typescript": "^4.9.4"
},
"dependencies": {
"confusables": "^1.1.1",
"moize": "^6.1.3"
"moize": "^6.1.5"
},

@@ -70,0 +70,0 @@ "babel": {

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