zeed
    Preparing search index...

    Function arraySetElement

    • Ensure el exists in arr. If not present, push it and return the array.

      Type Parameters

      • T

        element type

      Parameters

      • arr: T[]

        target array

      • el: T

        element to ensure

      Returns T[]

      the same array instance (modified if el was added)