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

1.0.0 • Public • Published

As you can tell, we can't afford a logo designer (Yes, that's Comic Sans 🤣)
Downloads: /week bundle size module formats: cjs, esm

Installation

Use the install command of your favourite package manager!

e.g.

npm install chucklejs

Usage

Simply import which ever utilities you would like to use

e.g.

import { getJoke } from "chucklejs";

try {
  console.log(
    await getJoke(["Programming", "Dark", "Pun"], {
      blacklistFlags: ["nsfw", "racist", "explicit"],
      types: ["twopart"],
    })
    /*  [
            {
                category: "Programming",
                type: "twopart",
                setup: "why do python programmers wear glasses?",
                delivery: "Because they can't C.", 🤣🤣🤣
            }
        ]
    */
    ]
  );
} catch (error) {
  /* Error Handling */
}

Docs

function getJoke(
  categories: Category[] | undefined,
  { blacklistFlags, amount, language, contains, types }: Options
): Promise<
  (
    | {
        category: Category;
        type: "single";
        joke: string;
      }
    | {
        category: Category;
        type: "twopart";
        setup: string;
        delivery: string;
      }
  )[]
>;

Readme

Keywords

Package Sidebar

Install

npm i chucklejs

Weekly Downloads

4

Version

1.0.0

License

MIT

Unpacked Size

7.41 kB

Total Files

6

Last publish

Collaborators

  • 11xdeveloper