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

    Function appendParam

    Utilities for uri

    David Hsing

    • Returns the joined string that represent the given source and param

      Parameters

      • Optionalsource: null | string

        The source uri to prepend

      • Optionalparam: null | string

        The target param to append

      Returns undefined | null | string

      the joined string that represent the given source and param

      David Hsing

      appendParam(undefined, 'foo=bar');    // 'foo=bar'
      appendParam('unikue.cn/donation', undefined); // 'unikue.cn/donation'
      appendParam('unikue.cn/donation', 'foo=bar'); // 'unikue.cn/donation?foo=bar'
      appendParam('unikue.cn/donation?from=today', 'foo=bar'); // 'unikue.cn/donation?from=today&foo=bar'