Every line of 'localurl' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
11 function local(url) { 12 return path.join("./tmp", encodeURIComponent(url)); 13 }
9 function localUrl(url) { 10 if (url.startsWith('http')) { 11 return url; 12 } 13 14 return `//${adminApiHost}${url}`; 15 }
98 function normalizeLocalUrl(url) { 99 // Step 1: make the url protocol less first. This helps recognizing http://0.0.0.0:3001/common.css 100 // and //0.0.0.0:3001/common.css as the same file. 101 // Step 2: The browser will give us a full URL even if we only put a 102 // path in on the server. So, if we're comparing against just 103 // a path here we need to strip the base off to avoid a flash 104 // of unstyled content. 105 if (typeof url === 'string') { 106 url = url 107 .replace(/^http[s]?:/, '') 108 .replace(new RegExp("^//" + location.host), ''); 109 } 110 111 return url; 112 }
189 getUrl() { 190 logger.debug('getUrl::' + this._url); 191 return this._url; 192 }
10 function remote(url) { return (new RegExp('git@github.com:(.+)\\/(.+)\\.git', 'ig').exec(url) || new Array(3).fill(null)).slice(1); }
156 uniquenessReturn.localUrl = function localUrl () { 157 // splitting the href looking for our index and magic word unique 158 var url = window.location.href.split('#') 159 if (url.length < 2) { 160 return false 161 } else { // it contains # 162 url = url[url.length - 1] 163 if (url.slice(0, 6) === 'unique') { // found magic word 164 url = url.slice(6) 165 url = parseInt(url) 166 uniquenessReturn.goto(url) 167 return url 168 } else return false // return false so the || sets start_with option instead 169 } 170 }
692 public getUrl(): string | null { 693 return this.url; 694 }