Helpful
    Preparing search index...

    Function joinDefined

    • Similar to Array.join but filters out null and undefined items.

      Type Parameters

      • T

        The type of data to join.

      Parameters

      Returns string

      A string that joins the items that are defined, separated by delimiter.

      // 'a b d'
      const joinBySpace = joinDefined(' ', 'a', 'b', ['c', false], null, undefined, ['d', true]);
      // (Empty String)
      const joinEmpty = joinDefined('?');