jokifie
v1.0.2
Published
A simple package to get jokes.
Downloads
12
Readme
Jokifie
Jokifie is a Node.js module that provides a collection of jokes categorized into various topics. Whether you need a quick laugh or want to integrate humor into your application, jokifie has you covered.
Installation
You can install Jokifie using npm:
npm install jokifie
Usage
Importing the Module
CommonJS (Node.js)
const { getJoke, getRandomJoke } = require('jokifie');
ES Module (ESM)
import { getJoke, getRandomJoke } from 'jokifie';
Getting a Random Joke
const joke = await getRandomJoke();
console.log(joke);
Getting a Joke by Category
const joke = await getJoke('Programming');
console.log(joke);
Available Categories
- Animals
- Lawyer
- Doctor
- Teacher
- Technology
- Programming
- Food
- Sports
- Math
- Science
- Office
- Holiday
Error Handling
If no jokes are found for a category or an error occurs during joke retrieval, appropriate error messages will be logged to the console.
Contributing
Contributions are welcome! If you'd like to add more jokes, improve the code, or report issues, please visit the GitHub repository.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
For more detailed help, please mail to [email protected]
Acknowledgments
jokifie uses the following open-source libraries:
- colors - For colored terminal output.
About
Jokifie is maintained by Gpcodez. You can find more of my projects at my website.