join-path

Join urls or system paths, even with undefined values

urljoin

Join the urls like joining the paths