Some Random Cat
PackageGitHubDocumentationSupport
Insiders
Insiders
  • Introduction
  • Examples
    • Random Cat Image
    • Random Joke
  • Documentation
    • Classes
      • Generation
      • Random
      • Util
  • Misc
    • Reading Notation
Powered by GitBook
On this page
  • Code
  • Output

Was this helpful?

Export as PDF
  1. Examples

Random Joke

An example of how to generate a random joke!

PreviousRandom Cat ImageNextClasses

Last updated 4 years ago

Was this helpful?

Code

// This snippet uses some-random-cat version 2.0

const somethingRandom = require('some-random-cat').Random
somethingRandom.getJoke()
.then(res => {
    console.log(res)
    return
}) // Get the result
.catch(e => {
    console.error(e)
    return
}) // Catch the error

Output

Note: This returns a default JavaScript Object.