
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
chat-censoring
Advanced tools
A tiny & simple package for your chat application that allows you to remove or censor bad words in chat.
npm i chat-censoring
This function takes your message as argument and checks, if it includes a bad word. As result it returns either true or false.
Parameters:
| Parameter | Usage |
|---|---|
| message | The message you want to check |
Example:
const censoring = require('chat-censoring');
const isInsult = censoring.check('You are great!');
console.log(isInsult); // Prints false
const censoring = require('chat-censoring');
const isInsult = censoring.check('You are fucking stupid!');
console.log(isInsult); // Prints true
This function checks if there is a bad word in your provided message and replaces this word(s) with the character of your choise.
Parameter:
| Parameter | Usage |
|---|---|
| message | The message you want to check and censor if needed |
| censoringChar | The char you want to use to censor bad words |
Example:
const censoring = require('chat-censoring');
const friendlyMessage = censoring.censorMessage('This is fucking cool!', '*');
console.log(friendlyMessage); // Prints 'This is ******* cool!'
This package was created with the motivation to censor chat messages in Discord. Of course it can be used in other applications as well
Here is an example how you can use it for your Discord bot:
if(message.author.bot) return;
if(!content.startsWith(prefix)) {
if(censor.checkMessage(content)) {
message.delete()
.then(() => message.channel.send(`${message.author} said: ${censor.censorMessage(content, '#')}`))
.catch(err => {
console.log('An error occurred while censoring a message: ' + err);
return message.channel.send('Unfortunately an error has occurred :(');
});
}
return;
}
FAQs
Checks a message for bad words (and censor it)
We found that chat-censoring demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.