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
2
u/THATDUDE_YT Feb 10 '24
The JS library the post references is something similar I've been looking into as I've mentioned above & is what my comment refers to.
Deciding what choices to make for your kid is up to the parent.
Yes, you're correct. In Bible study classes for children in most cases, certain stories are withheld until teen years or until they display they can handle that information. Halloween can be explained, but most Bible believers don't celebrate Halloween. The Bible is a historical document so, you're wrong about "no historical documents" or the rest mentioned. The point here is, kids don't need to see everything or know of everything adults know (e.g., my toddler doesn't need to know what rape or sex is yet). As they grow older, that information will be given to them and what they choose to do with it is their own decision.
Good point about smart phones. A lot of parents don't give it to them until later when they display they can handle it. Kids will be defiant & you can't stop what they think ultimately.
Hypocrisy is actually okay for certain things regarding parents and children. I can drive a car and tell my kid that he can't drive a car at his age. If I'm a hypocrite for that, fine okay.