MCPcopy
hub / github.com/webpack/webpack / correctUrl

Function correctUrl

lib/sharing/utils.js:190–194  ·  view source on GitHub ↗

* make url right for URL parse * @param {string} gitUrl git url * @returns {string} fixed url

(gitUrl)

Source from the content-addressed store, hash-verified

188 * @returns {string} fixed url
189 */
190function correctUrl(gitUrl) {
191 // like:
192 // proto://hostname.com:user/repo -> proto://hostname.com/user/repo
193 return gitUrl.replace(RE_HOSTNAME_WITH_COLON, "$1/$2");
194}
195
196/**
197 * make url protocol right for URL parse

Callers 1

getGitUrlVersionFunction · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected