@pengzhanbo/utils - v3.7.3
    Preparing search index...

    Function combineURLs

    • Combines URLs.

      合并 URLs。

      Parameters

      • baseUrl: string

        The base URL. 基础 URL

      • ...urls: string[]

        The URLs to combine. 要合并的 URL

      Returns string

      The combined URL. 合并后的 URL

      combineURLs('http://example.com', 'foo', 'bar') // => http://example.com/foo/bar
      combineURLs('//example.com', '/foo') // => //example.com/foo
      combineURLs('/foo', 'bar', 'index.html') // => /foo/bar/index.html