Skip to content

Commit fc3f549

Browse files
committed
WIP
1 parent 0582d53 commit fc3f549

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

source-map-support.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,17 @@ function tryFileURLToPath(v) {
138138
return v;
139139
}
140140

141+
// TODO un-copy these from resolve-uri; see if they can be exported from that lib
142+
function isAbsoluteUrl(input) {
143+
return schemeRegex.test(input);
144+
}
145+
// Matches the scheme of a URL, eg "http://"
146+
const schemeRegex = /^[\w+.-]+:\/\//;
147+
function isSchemeRelativeUrl(input) {
148+
return input.startsWith('//');
149+
}
150+
151+
141152
// #region Caches
142153
/** @param {string} pathOrFileUrl */
143154
function getCacheKey(pathOrFileUrl) {
@@ -235,16 +246,6 @@ sharedData.internalRetrieveFileHandlers.push(function(path) {
235246
return setFileContentsCache(path, contents);
236247
});
237248

238-
// TODO un-copy these from resolve-uri; see if they can be exported from that lib
239-
function isAbsoluteUrl(input) {
240-
return schemeRegex.test(input);
241-
}
242-
// Matches the scheme of a URL, eg "http://"
243-
const schemeRegex = /^[\w+.-]+:\/\//;
244-
function isSchemeRelativeUrl(input) {
245-
return input.startsWith('//');
246-
}
247-
248249
// Support URLs relative to a directory, but be careful about a protocol prefix
249250
// in case we are in the browser (i.e. directories may start with "http://" or "file:///")
250251
function supportRelativeURL(file, url) {

0 commit comments

Comments
 (0)