Interface IRandomGenerator

interface IRandomGenerator {
    customs?: CustomMap;
    array<T>(closure: ((index: number) => T), count?: number, unique?: boolean): T[];
    bigint(minimum?: bigint, maximum?: bigint): bigint;
    boolean(): boolean;
    byte(): string;
    date(minimum?: number, maximum?: number): string;
    datetime(minimum?: number, maximum?: number): string;
    duration(): string;
    email(): string;
    hostname(): string;
    idnEmail(): string;
    idnHostname(): string;
    integer(minimum?: number, maximum?: number): number;
    ipv4(): string;
    ipv6(): string;
    iri(): string;
    iriReference(): string;
    jsonPointer(): string;
    length(): number;
    number(minimum?: number, maximum?: number): number;
    password(): string;
    pattern(regex: RegExp): string;
    regex(): string;
    relativeJsonPointer(): string;
    string(length?: number): string;
    time(): string;
    uri(): string;
    uriReference(): string;
    uriTemplate(): string;
    url(): string;
    uuid(): string;
}

Properties

customs?: CustomMap

Methods

  • Type Parameters

    • T

    Parameters

    • closure: ((index: number) => T)
        • (index): T
        • Parameters

          • index: number

          Returns T

    • Optionalcount: number
    • Optionalunique: boolean

    Returns T[]

  • Parameters

    • Optionalminimum: bigint
    • Optionalmaximum: bigint

    Returns bigint

  • Parameters

    • Optionalminimum: number
    • Optionalmaximum: number

    Returns string

  • Parameters

    • Optionalminimum: number
    • Optionalmaximum: number

    Returns string

  • Parameters

    • Optionalminimum: number
    • Optionalmaximum: number

    Returns number

  • Parameters

    • Optionalminimum: number
    • Optionalmaximum: number

    Returns number