• Returns a string that concat the given text and suffix

    Parameters

    • Optionaltext: null | string

      the text to check

    • Optionalsuffix: null | string

      the suffix to append

    Returns string | undefined | null

    a string that concat the given text and suffix

    appendIfMissing('foo', 'bar');    // 'foobar'
    appendIfMissing('foobar', 'bar'); // 'foobar'