jokify
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

NPM Downloads NPM Version install size npm bundle size Gitpod Ready-to-code

jokify

Random funny dadjokes fetcher

Installation

To get started with jokify, simply run the following command in your terminal:

npm installation command:

$ npm i jokify

yarn installation command:

$ yarn add jokify

Getting started

First, require this library to your project as follows:

const jokify = require("jokify");

If it's an ES Module then import it to your project as follows:

import jokify from "jokify";

Notes

New to Promises?

If you're not familiar with promises, check out the MDN documentation to learn more.

Api usage

Once you've imported jokify into your project, you're ready to fetch your first funny dadjoke.

Here's a simple example to get you started:

// Import the 'JokifyClient' class
const { JokifyClient } = require("jokify");

// Create a new instance of 'JokifyClient' class
const client = new JokifyClient();

// Call the fetchJoke() method
client.fetchJoke()
    .then(result => {
        // Log the result
        console.log(result);
        // Result object contains:
        // - joke
        // - id
        // - status
    })
    .catch(error => {
        // Handle any error(s) which occur
        console.error(error);
    })

LICENSE

jokify is released under the MIT License.

View the full license terms here.

Bugs & Issues

Found a bug or want a new feature?

Report issues and request features on the jokify issue tracker.

Thanks for reading!

Have a great day ahead :D

Dependents (0)

Package Sidebar

Install

npm i jokify

Weekly Downloads

18

Version

1.1.0

License

MIT

Unpacked Size

10.9 kB

Total Files

10

Last publish

Collaborators

  • blazeinferno