
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
random-jokes
Advanced tools
Random Jokes is a package that allows you to get different type of jokes
Also has some extras like facts and trump quotes
You simply just import what you you want
const {
getDadjoke,
getPunchLine,
getRandomCHNJoke,
getCategoryCHNJoke,
matchChuckJoke,
matchJoke,
getRandomJoke
getRandomTrumpQuote,
getFact
} = require('random-jokes')
Below is an Example of using async with a few of the Jokes
const { getDadjoke, getPunchLine, getRandomJoke } = require("random-jokes")(
async () => {
//return as a string
const dadJoke = await getDadjoke();
console.log(dadJoke);
// return an object, with the setup and delivery
const punchline = await getPunchLine();
console.log(punchline);
// if a joke is considered to be in one of these categories it will not return it
const blacklist = [
"nsfw",
"religious",
"political",
"racist",
"sexist",
"explicit",
];
//returns an object with the joke and a property 'safe' to show whether the joke is safe or not
//param takes either a string or array
const joke = await getRandomJoke(blacklist | "nsfw");
console.log(joke);
}
)();
Below are non-async example
const {
getRandomCHNJoke,
getCategoryCHNJoke,
matchChuckJoke,
matchJoke,
} = require("random-jokes");
matchChuckJoke().then((jokes) => {
console.log(jokes);
});
matchJoke().then((joke) => {
console.log(joke, joke.setup, joke.delivery, joke.safe);
});
/**
* @description List of valid categories
* "Categories": [
"animal",
"career",
"celebrity",
"dev",
"explicit",
"fashion",
"food",
"history",
"money",
"movie",
"music",
"political",
"religion",
"science",
"sport",
"travel"
]
*/
getCategoryCHNJoke("dev").then((joke) => {
console.log(joke);
});
getRandomCHNJoke().then((joke) => {
console.log(joke);
});
Here are some extra things:
const { getRandomTrumpQuote, getFact } = require("random-jokes");
getRandomTrumpQuote().then((TrumpQuote) => {
console.log(TrumpQuote, TrumpQuote.quote, TrumpQuote.target);
});
getFact().then((joke) => {
console.log(joke);
});
Like this package, be sure to give the github repo a star!
Create a new issue!
FAQs
A Package that allows you to get different type of jokes
We found that random-jokes 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.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.