calvin-and-hobbes-quotes

Get Calvin and Hobbes quotes

Usage no npm install needed!

<script type="module">
  import calvinAndHobbesQuotes from 'https://cdn.skypack.dev/calvin-and-hobbes-quotes';
</script>

README

Calvin and Hobbes quotes

Build Status

The quote list is just a JSON file and can be used wherever.
I tried picking quotes that are not too lengthy and that don't need context.

things are never quite as scary when you've got a best friend

All rights reserved to Bill Watterson for both the image above and all these brilliant quotes.

Install

$ npm install --save calvin-and-hobbes-quotes

Usage

const calvinAndHobbesQuotes = require('calvin-and-hobbes-quotes');

console.log(`“${calvinAndHobbesQuotes.random()}”`);
// returns “Life is full of surprises, but never when you need one.”

API

.all

Type: array

List all quotes.

.random()

Type: function

Random quote.

CLI

$ npm install --global calvin-and-hobbes-quotes
$ calvin-and-hobbes-quotes --help

Usage:
  $ calvin-and-hobbes-quotes

Commands:
  Options:
    -h, --help      Print usage
    -a, --all       Print all Calvin and Hobbes quotes
    -s, --say       Speak with cowsay

Examples:
  $ calvin-and-hobbes-quotes                      # prints a random quote
  $ calvin-and-hobbes-quotes -a                   # lists all quotes
  $ calvin-and-hobbes-quotes -s                   # speaks a random quote with cowsay

Contributing

See a quote that is not in the comics or has an error? Please create an issue or open a pull request.
Want to add a quote? Make sure the quote is present in the original comics and use proper quotation characters.


Inspired by reading Calvin and Hobbes and bumping into cat-names and random-tree-names.