@unikue/ts-lang-utils
    Preparing search index...

    Function defaultIfBlank

    • Returns the default value if the given text is blank, or the text self if it is not blank

      Parameters

      • Optionaltext: null | string

        The text to check

      • OptionaldefaultValue: null | string

        The default value placeholder

      Returns undefined | null | string

      the default value if the given text is blank, or the text self if it is not blank

      David Hsing

      defaultIfBlank(undefined, 'foobar');    // 'foobar'