just-jokes
v1.0.2
Published
Random Joke and YoMomma Joke Generator Package
Downloads
40
Maintainers
Readme
Just Jokes
Description
A simple package to randomly generate jokes, including Yo Momma jokes!
Installation
npm install just-jokes
or
yarn add just-jokes
Usage
const {
randomJoke,
randomJokes,
yoMommaJoke,
yoMommaJokes,
} from ('just-jokes);
// Get a random Joke
const joke = randomJoke();
const yoMomma = yoMommaJoke();
// Get an array of jokes by number desired. Max 50
const jokes = randomJokes(10);
const yoMommas = yoMommaJokes(10)
Return Values
// random joke
{
id: number
type: string // "general" || "programming"
setup: string
punchline: string
}
// yoMomma
{
id: number
type: string // "yo-momma"
setup: undefined
punchline: string
}
Credit
Forked random jokes from 15Datz official_joke_api YoMomma jokes provided by Josh Buchea