Interface IRandomGenerator
Methods
array
- array<T>(
schema: Omit<IArray, "items"> & {
element: (index: number, count: number) => T;
},
): T[] Parameters
- schema: Omit<IArray, "items"> & { element: (index: number, count: number) => T }
Returns T[]
bigint
- bigint(schema: IInteger): bigint
Returns bigint
boolean
- boolean(): undefined | boolean
Returns undefined | boolean
byte
- byte(): string
Returns string
date
- date(props?: { maximum?: number; minimum?: number }): string
Parameters
Optional
props: { maximum?: number; minimum?: number }
Returns string
datetime
- datetime(props?: { maximum?: number; minimum?: number }): string
Parameters
Optional
props: { maximum?: number; minimum?: number }
Returns string
duration
- duration(): string
Returns string
email
- email(): string
Returns string
hostname
- hostname(): string
Returns string
idnEmail
- idnEmail(): string
Returns string
idnHostname
- idnHostname(): string
Returns string
integer
- integer(schema: IInteger): number
Returns number
ipv4
- ipv4(): string
Returns string
ipv6
- ipv6(): string
Returns string
iri
- iri(): string
Returns string
iriReference
- iriReference(): string
Returns string
jsonPointer
- jsonPointer(): string
Returns string
number
- number(schema: INumber): number
Returns number
password
- password(): string
Returns string
pattern
- pattern(regex: RegExp): string
Returns string
regex
- regex(): string
Returns string
relativeJsonPointer
- relativeJsonPointer(): string
Returns string
string
- string(schema: IString): string
Returns string
time
- time(): string
Returns string
uri
- uri(): string
Returns string
uriReference
- uriReference(): string
Returns string
uriTemplate
- uriTemplate(): string
Returns string
url
- url(): string
Returns string
uuid
- uuid(): string
Returns string