@mikemcbride/dad-jokes
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

dad-jokes

Everybody loves dad jokes... right?

The jokes list is just a JSON file and can be used wherever. PRs welcome if you've got a good dad joke!

Install

$ npm install --save @mikemcbride/dad-jokes

Usage

const dadJokes = require('dad-jokes');

dadJokes.random();
//=> 'The shovel was a ground-breaking invention.'

API

.all

Type: array

All the dad jokes we have.

.random()

Type: function

Random dad joke from the list.

CLI

$ npm install --global @mikemcbride/dad-jokes
$ dad-jokes --help

  Examples
    $ dad-jokes
    The shovel was a ground-breaking invention.

    $ dad-jokes --all
    Did you hear about the restaurant on the moon? Great food, no atmosphere.
    What do you call a fake noodle? An impasta.
    How many apples grow on a tree? All of them.
    ...

  Options
    --all   Get all jokes instead of a random joke

License

MIT © Mike McBride

Package Sidebar

Install

npm i @mikemcbride/dad-jokes

Weekly Downloads

4

Version

2.0.0

License

MIT

Unpacked Size

10.3 kB

Total Files

7

Last publish

Collaborators

  • mikemcbride