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
  • Methods </ >
  • .getAdvice() STATIC </ >
  • .getCat() STATIC </ >
  • .getDog() STATIC </ >
  • .getFact() STATIC </ >
  • .getJoke() STATIC </ >
  • .getMeme(sub) STATIC </ >
  • .getString(number) STATIC </ >
  • .getTopic() STATIC </ >

Was this helpful?

Export as PDF
  1. Documentation
  2. Classes

Random

The class for generating random things such as cat images, dog images, jokes and much more!

PreviousGenerationNextUtil

Last updated 4 years ago

Was this helpful?

Please make sure you do not instantiate this class. You can access it though const something = require('some-random-cat').Random

Methods

.getAdvice() STATIC

Random method to generate an advice.

Type

Description

any

The string with the advice.

Returns:

.getCat() STATIC

Random method to generate a random cat image.

Type

Description

any

URL for the image.

Returns:

.getDog() STATIC

Random method to generate a random dog image.

Type

Description

any

URL for the image.

Random method to generate a random fact.

Type

Description

any

The string for the fact.

Random method to generate a random joke.

Type

Description

any

An object with the title, description and URL

Random method to generate a meme.

Parameters

Type

Optional

Description

sub

String

❌

The subreddit to get the meme from.

Gets a random string of a length.

Parameters

Type

Optional

Description

number

Number

❌

The length of the string.

Random method to generate a topic.

Type

Description

any

The string with the topic.

Returns:

.getFact() STATIC

Returns:

.getJoke() STATIC

Returns:

.getMeme(sub) STATIC

Returns:

.getString(number) STATIC

Returns:

.getTopic() STATIC

Returns:

</ >
</ >
Promise<Pending>
</ >
Promise<Pending>
</ >
Promise<Pending>
</ >
Promise<Pending>
</ >
Promise<Pending>
</ >
Promise<Pending>
</ >
Promise<Pending>
</ >
Promise<Pending>