@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: string | null

        The text to check

      • OptionaldefaultValue: string | null

        The default value placeholder

      Returns string | null | undefined

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

      David Hsing

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