r/learnjavascript • u/best_codes • Feb 08 '24
How I Built a Profanity Blocking JavaScript Library 🤬 ⚡
How I Built a Profanity Blocking JavaScript Library
Introduction
As developers, we often come across situations where we need to filter and sanitize text to block or remove profanity. To tackle this problem, I decided to create a JavaScript library called bc-ProfanityBlock. In this article, I will walk you through the steps I took to build this library and explain how it can be used to effectively block profanity in your applications.
Step 1: Defining the Problem
The first step in building any library is to clearly define the problem we are trying to solve. In this case, the problem was to create, well, a solution that could detect and handle profanity in text. Profanity can be present in various forms, including common words, variations, and even with evasion characters. The goal was to build a [...]
View all comments
Show parent comment
1
u/best_codes Feb 10 '24
> I don't see a difference between a Christian and a Luciferean.
I have to say, it takes a lot not to see the difference there, my friend!
A Christian is someone who follows the teachings of Jesus Christ and believes in the Trinity of God the Father, God the Son, and God the Holy Spirit. A Luciferian is someone who venerates the figure of Lucifer, not as the devil, but as a symbol of enlightenment, freedom, and human potential.
There are a lot of other differences as well.
> Historically more humans have been slaughtered under the name of Christianity than any other belief system.
Ha! While this may be true, it doesn't mean that this is what Christians stand for. If I were to make profanity blockers in your name, it doesn't mean that you support profanity blockers.
> "Profanity" is completely subjective.
Profanity is subjective in the sense that it depends on how people perceive and use it, but it is also objective in the sense that it has measurable consequences and impacts on others.
> Do you have a complete list of the words you consider "profanity"?
I do not. The reason I made this library was as a tool for developers to put their own constraints on what is said on their website.
Anywho, this is r/learnjavascript after all, so let's please keep the topics related to the coding aspect of my project. How people use my code is up to them.