iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: http://github.com/lamhotsimamora/Filter-Kata-Kotor
GitHub - lamhotsimamora/Filter-Kata-Kotor: Javascript Function For Filter String Of Bad Words ( Indonesia Language & English Language )
Skip to content

Javascript Function For Filter String Of Bad Words ( Indonesia Language & English Language )

License

Notifications You must be signed in to change notification settings

lamhotsimamora/Filter-Kata-Kotor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filter-Kata-Kotor

This repository is just an example for filtering of bad words with JAVASCRIPT and also you can use this library for your website. Enjoy ! Please share this page if you like it ! (Sorry ! if the bad words is too HARD to say ! ) (Source bad words from Google). I was used this library for my website (http://x.lamhotsimamora.com/)


Clone

git clone https://github.com/lamhotsimamora/Filter-Kata-Kotor.git

DEMO

https://lamhotsimamora.github.io/Filter-Kata-Kotor/

https://jsfiddle.net/LamhotSimamora/d3qsvLum/4/

CDN

https://cdn.rawgit.com/lamhotsimamora/Filter-Kata-Kotor/master/filter-bad-word.js

HTML

<script type="text/javascript" src="https://cdn.rawgit.com/lamhotsimamora/Filter-Kata-Kotor/master/filter-bad-word.js"></script>

How to use ?


First

Function with default dictionary (Indonesia language) of bad word and default filter string "***"

var my_string = "Awas kau ya BABI !";

var result = _filterBadWord(my_string);

Second

Function with default dictionary (Indonesia language) of bad word and with custom filter string "####" (any character that you want)

var my_string = "Awas kau ya BABI !";

var result = _filterBadWord(my_string,"###");

Third

Function with custom dictionary of bad word and with custom filter string "..." (any character that you want)

var my_string = "Hi bro ! You are fucking bitch ! Asshole !";

const my_bad_word = [
	'Asshole','Fuck You','Damn','Bitch','Fucking'
];

var result = _filterBadWord(my_string,"...",my_bad_word);