npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-jokes

v1.0.0

Published

A free and open source library for one-liner random developer friendly jokes in node

Downloads

119

Readme

node-jokes

A free and open source library for one-liner random developer friendly jokes in node

Installation

Install node-jokes with npm

npm install node-jokes

Usage/Examples

Get random joke

import NodeJoke from "node-jokes";

const joke = NodeJoke.getJoke();
console.log(joke);

Get multiple jokes

import NodeJoke from "node-jokes";

const jokes = NodeJoke.getJokes();
console.log(jokes);

Parameter Reference

Get random joke

const joke = NodeJoke.getJokes("en", "general");

| Parameter | Type | Description | | :--------- | :------- | :------------------ | | lang | string | Language preference | | category | string | category preference |

Get multiple jokes

const jokes = NodeJoke.getJokes(10, "en", "general");

| Parameter | Type | Description | | :--------- | :------- | :--------------------------------------- | | limit | number | Numbers of jokes required, default is 10 | | lang | string | Language preference | | category | string | category preference |

Parameters supports

lang

| Parameter | Description | | :-------- | :---------- | | en | English | | esp | Spanish | | hi | Hindi | | fr | French | | jp | Japanese |

category

| Parameter | Description | | :------------ | :------------------------------------ | | general | jokes related to general category | | pun | jokes related to pun category | | life | jokes related to life category | | programming | jokes related to programming category | | humor | jokes related to humor category | | knock-knock | jokes related to knock-knock category |

Run Locally

Clone the project

git clone https://github.com/sandeep-shome/node-jokes.git

Go to the project directory

cd my-project

Install dependencies

npm install

Start the server

npm run start

Appendix

Node-Joke is a completely free and open-source joke-as-a-service project designed for entertainment. It stores all jokes internally within the package, which can lead to limitations in the randomness of generated jokes. After delivering a few random jokes, there's a possibility of repetition.

As a solo developer, I may not be able to add as many jokes as desired. This project is currently in beta, and I aim to expand the joke library in the future. Enjoy the jokes available now!

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Please adhere to this project's code of conduct.

Authors

License

MIT