@pengzhanbo/utils - v3.4.1
    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