Module generate
Generate Functions
generateBoolean
- generateBoolean(): boolean
-
Returns boolean
True or false
generateColor
-
Returns string
Hex color.
generateFromArray
- generateFromArray<Type>(arrayFrom: Type[]): Type
-
Type parameters
Parameters
Returns Type
Value from array.
generateInteger
- generateInteger(min?: number, max?: number): number
-
Parameters
-
min: number = 0
-
max: number = ...
Returns number
generatePinCode
- generatePinCode(size?: number, blockList?: string[]): string
-
Parameters
-
size: number = 4
-
Optional blockList: string[]
Returns string
Random PIN code string.
generateRange
- generateRange(from?: number | BigInt, to?: number | BigInt, step?: number | BigInt, type?: "number" | "bigint"): any[]
-
Parameters
-
from: number | BigInt = 0
-
to: number | BigInt = ...
-
step: number | BigInt = 1
-
type: "number" | "bigint" = "number"
Returns any[]
generateString
- generateString(size: number, possible?: string): string
-
Parameters
-
size: number
-
possible: string = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
Returns string
generateToken
- generateToken(size?: number): string
-
Parameters
Returns string
generateUuid
-
Returns string
generateUuid4
-
Returns string
generateBoolean
Generate random boolean value
0.1.32