Utilities for uri
David Hsing
Returns the joined string that represent the given source and param
Optional
The source uri to prepend
The target param to append
the joined string that represent the given source and param
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' Copy
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'
Utilities for uri
Author
David Hsing