Static
Readonly
boolean
boolean: () => boolean = randomBoolean
Type declaration
- (): boolean
Returns boolean
A random boolean
Static
Readonly
color
color: () => [
| "Default"
| "White"
| "Aqua"
| "Green"
| "Blue"
| "Yellow"
| "Purple"
| "LuminousVividPink"
| "Fuchsia"
| "Gold"
| "Orange"
| "Red"
| "Grey"
| "Navy"
| "DarkAqua"
| "DarkGreen"
| "DarkBlue"
| "DarkPurple"
| "DarkVividPink"
| "DarkGold"
| "DarkOrange"
| "DarkRed"
| "DarkGrey"
| "DarkerGrey"
| "LightGrey"
| "DarkNavy"
| "Blurple"
| "Greyple"
| "DarkButNotBlack"
| "NotQuiteBlack",
| 0
| 1146986
| 1752220
| 2067276
| 2123412
| 2303786
| 2895667
| 2899536
| 3426654
| 3447003
| 5763719
| 5793266
| 7419530
| 8359053
| 9807270
| 9936031
| 10038562
| 10070709
| 10181046
| 11027200
| 11342935
| 12370112
| 12745742
| 15105570
| 15277667
| 15418782
| 15548997
| 15844367
| 16705372
| 16777215,
] = randomColor
Type declaration
- (): [
| "Default"
| "White"
| "Aqua"
| "Green"
| "Blue"
| "Yellow"
| "Purple"
| "LuminousVividPink"
| "Fuchsia"
| "Gold"
| "Orange"
| "Red"
| "Grey"
| "Navy"
| "DarkAqua"
| "DarkGreen"
| "DarkBlue"
| "DarkPurple"
| "DarkVividPink"
| "DarkGold"
| "DarkOrange"
| "DarkRed"
| "DarkGrey"
| "DarkerGrey"
| "LightGrey"
| "DarkNavy"
| "Blurple"
| "Greyple"
| "DarkButNotBlack"
| "NotQuiteBlack",
| 0
| 1146986
| 1752220
| 2067276
| 2123412
| 2303786
| 2895667
| 2899536
| 3426654
| 3447003
| 5763719
| 5793266
| 7419530
| 8359053
| 9807270
| 9936031
| 10038562
| 10070709
| 10181046
| 11027200
| 11342935
| 12370112
| 12745742
| 15105570
| 15277667
| 15418782
| 15548997
| 15844367
| 16705372
| 16777215,
] Returns [
| "Default"
| "White"
| "Aqua"
| "Green"
| "Blue"
| "Yellow"
| "Purple"
| "LuminousVividPink"
| "Fuchsia"
| "Gold"
| "Orange"
| "Red"
| "Grey"
| "Navy"
| "DarkAqua"
| "DarkGreen"
| "DarkBlue"
| "DarkPurple"
| "DarkVividPink"
| "DarkGold"
| "DarkOrange"
| "DarkRed"
| "DarkGrey"
| "DarkerGrey"
| "LightGrey"
| "DarkNavy"
| "Blurple"
| "Greyple"
| "DarkButNotBlack"
| "NotQuiteBlack",
| 0
| 1146986
| 1752220
| 2067276
| 2123412
| 2303786
| 2895667
| 2899536
| 3426654
| 3447003
| 5763719
| 5793266
| 7419530
| 8359053
| 9807270
| 9936031
| 10038562
| 10070709
| 10181046
| 11027200
| 11342935
| 12370112
| 12745742
| 15105570
| 15277667
| 15418782
| 15548997
| 15844367
| 16705372
| 16777215,
]
A random color
Static
Readonly
float
float: (min: number, max: number) => number = randomFloat
Type declaration
- (min: number, max: number): number
Returns number
A random float
Static
Readonly
int
int: (min: number, max: number) => number = randomInt
Type declaration
- (min: number, max: number): number
Returns number
A random integer
Static
Readonly
item
item: <T>(items: T[]) => undefined | T = randomItem Type declaration
- <T>(items: T[]): undefined | T
Returns undefined | T
A random item
Static
Readonly
key
key: <T>(items: Record<string, T> | T[]) => undefined | string = randomKey Static
Readonly
string
Type declaration
- (length: number, characters?: string | RandomStringOptions): string
Returns string
A random string
Static
Readonly
value
value: <T>(items: Record<string, T> | T[]) => undefined | T = randomValue
A utility wrapper for "random" functions.
Please note: These functions are not cryptographically secure, and are considered "pseudo-random".