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.2.6 to 1.2.7

2

lib/index.d.ts

@@ -50,3 +50,3 @@ /**

/**
* Special chars to allow on start and end of a word
* Special chars to allow on start and/or end of a word
* @defaultValue <code>/\d|[!@#$%^&*()[\\];:'",.?\\-_=+~`|]|a|(?:the)|(?:el)|(?:la)/</code>

@@ -53,0 +53,0 @@ * @type {[type]}

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

@@ -8,16 +8,11 @@ "keywords": [

"swear",
"bad",
"word",
"words",
"badwords",
"profanity",
"filter",
"checker",
"badwords",
"clean",
"detect",
"detector",
"checker",
"sanitize",
"dirty",
"utility",
"obscene",
"typescript"

@@ -24,0 +19,0 @@ ],

# bad-words-next
![workflows-nodejs-ci](https://github.com/alexzel/bad-words-next/actions/workflows/node-ci.yml/badge.svg)
![workflows-wiki-doc](https://github.com/alexzel/bad-words-next/actions/workflows/wiki-doc.yml/badge.svg)
![workflows-nodejs-ci](https://github.com/alexzel/bad-words-next/actions/workflows/node-ci.yml/badge.svg?branch=main)
![workflows-wiki-doc](https://github.com/alexzel/bad-words-next/actions/workflows/wiki-doc.yml/badge.svg?branch=main)
![npm version](https://img.shields.io/npm/v/bad-words-next)

@@ -74,12 +74,18 @@ ![NPM license](https://img.shields.io/npm/l/bad-words-next)

interface Data {
id: string // unique ID
words: string[] // words list, supports `*` on start and end of a string to indicate any characters, also `+` for one or more repeating characters, and `_` for special characters.
lookalike: Lookalike // map for homoglyphs conversion
id: string // Unique dictionary ID
words: string[] // Words list
lookalike: Lookalike // Lookalike homoglyphs map
}
interface Lookalike {
[key: string | number]: string // just a simple key-value object
[key: string | number]: string // Simple key-value object
}
```
You can use the following pattern characters in a word string:
- `*` indicates any characters, use it only on start and/or end of a word
- `+` indicates one or more repeating characters
- `_` indicates special characters
## Options

@@ -90,10 +96,12 @@

data?: Data // Dictionary data
placeholder?: string // Filter placeholder - default value '***'
specialChars?: RegExp // Special chars to allow on word start and word end - default value /\d|[!@#$%^&*()[\];:'",.?\-_=+~`|]|a|(?:the)|(?:el)|(?:la)/
spaceChars?: string[] // Pseudo space chars, a list of values for `_` symbol in a dictionary word string - default value ['', '.', '-', ';', '|']
placeholder?: string // Filter placeholder - default '***'
specialChars?: RegExp // Special chars to allow on start and/or end of a word - default /\d|[!@#$%^&*()[\];:'",.?\-_=+~`|]|a|(?:the)|(?:el)|(?:la)/
spaceChars?: string[] // Pseudo space chars, a list of values for `_` symbol in a dictionary word string - default ['', '.', '-', ';', '|']
confusables?: string[] // List of ids to apply transformations from `confusables` npm package - default ['en', 'es', 'de']
maxCacheSize?: number // Max items to store in cache - default value 100
maxCacheSize?: number // Max items to store in cache - default 100
}
```
See [Options API](https://github.com/alexzel/bad-words-next/wiki/Options) for more details.
## Notes

@@ -100,0 +108,0 @@

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