@wxn0brp/db-core
    Preparing search index...

    Function genId

    • Generates a unique random identifier based on time and parts.

      Parameters

      • Optionalparts: number[] = null

        an array of lengths of parts of the identifier

      • idData: {
            lastGeneratedMs: number;
            lastId: string;
            lastRandomValue: number;
            recentIdsTimestamps: number[];
            startIndex: number;
            usedIds: Map<any, any>;
        } = defaultIdData

      Returns string

      • a new unique identifier