Testing out
faiyaz26 / one-liner-joke Goto Github PK
View Code? Open in Web Editor NEWA simple Node Module which can provide one line joke randomly or from specific tag
License: MIT License
A simple Node Module which can provide one line joke randomly or from specific tag
License: MIT License
Testing out
They are not funny..
Any fix ?
Here are a few examples of (sexist/racist) jokes I found in this repository which should be removed or at least filtered out by the default method:
What is the difference between a black and a bucket of sh-t? The bucket.
What do you call 100 n-ggers on the bottom of the sea? A good start.
Why do bachelors like smart women? Because they're so rare.
What do u do when your sitting in the dark and your TV starts to float? You turn on the lights and shoot the black guy stealing it.
Being labelled "one-liner-joke" developers may use it as generic chatbots, or in areas where it is not acceptable (I understand the developer takes responsibility for not checking which packages it uses).
getRandomJokes({ darkHumour: false })
perhaps an option parameter, where this is false by default, or getRandomJokes({ exclude: [ "racist", "sexist" ] })
.
I think some of the jokes are really good, but there are extremely controversial ones.
Thank you.
When you are checking if joke has excluded tags, you check if indexOf(...) > 0 (here https://github.com/faiyaz26/one-liner-joke/blob/master/index.js#L25 and in couple other places), which is wrong, you should be checking if indexOf(...) >= 0. As a result of this error, first excluded tag is skipped, and that means that with default settings you still allow racist jokes although you say in docs that you don't!
There are many racist jokes that are not labeled as racist. While I would vote for removing racist jokes completely, the first step is at least labeling them correctly. This jokes not being labeled correctly could be dangerous for somebody looking to generate a random joke which is suitable for work, as they might by mistake get a racist joke, even though it says in your README that by default jokes with 'racist' tag are excluded -> it doesn't however say that a lot of them are not correctly tagged.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.