The class for generating random things such as cat images, dog images, jokes and much more!
Please make sure you do not instantiate this class. You can access it though const something = require('some-random-cat').Random
Random method to generate an advice.
Returns: Promise<Pending>
Random method to generate a random cat image.
Returns: Promise<Pending>
Random method to generate a random dog image.
Returns: Promise<Pending>
Random method to generate a random fact.
Returns: Promise<Pending>
Random method to generate a random joke.
Returns: Promise<Pending>
Random method to generate a meme.
Returns: Promise<Pending>
Gets a random string of a length.
Returns: Promise<Pending>
Random method to generate a topic.
Returns:Promise<Pending>
Type
Description
any
The string with the advice.
Type
Description
any
URL for the image.
Type
Description
any
URL for the image.
Type
Description
any
The string for the fact.
Type
Description
any
An object with the title, description and URL
Parameters
Type
Optional
Description
sub
String
❌
The subreddit to get the meme from.
Parameters
Type
Optional
Description
number
Number
❌
The length of the string.
Type
Description
any
The string with the topic.
The class for getting information on the package or testing it.
Please make sure you do not instantiate this class. You can access it though const something = require('some-random-cat').Util
.info
STATIC
The general information for the package.
Type: ?Object
.test()
STATIC
Random method to generate an advice.
Returns: Promise<Pending>
Examples:
The class for generating secure IDs, formatting time and much more...
Please make sure you do not instantiate this class. You can access it throughconst somethingRandom = require('some-random-cat').Generation
.formatTime(time)
STATIC
Generation method to format time to 00:00
Returns: <>
.generateId(options)
STATIC
Generation method to secure a well secure UUID.
Returns: <>
.getAcronym(name)
STATIC
Generation method to get acronym for a string.
Generation method to shorten a string by length.
Returns: <>
Returns: <>
PARAMETER
TYPE
DESCRIPTION
author
String
The author(s) of the package.
description
String
The description of the package.
repo
Object
Current repository(s) of the package.
version
String
The version of the package.
Type
Description
any
Tests the package and retrieves an error(if any).
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
name | String | ❌ | none | The string to get acronym for. |
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
text | String | ❌ | none | The string to shorten. |
length | Number | ❌ | none | The length to shorten. |
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
time | ❌ | none | The time to format. |
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
options | ✅ | none | The options for the ID. |
options.putDash | ✅ | true | Whether or not to put a |