ducjs - v4.4.2
    Preparing search index...

    Function restoreGroups

    • Restores the groups array from imported data, ensuring each item conforms to the DucGroup type.

      This function iterates through the raw input, filters out any invalid entries, and constructs a new array of clean, validated DucGroup objects.

      Parameters

      • groups: unknown

        The raw, untrusted array of group-like objects.

      Returns DucGroup[]

      A validated array of DucGroup objects, or an empty array if the input is invalid.