MCPcopy Create free account
hub / github.com/ClydeTime/Surge / isAbsoluteURL

Method isAbsoluteURL

Script/Env.js:312–314  ·  view source on GitHub ↗

* * @param {String} url * @returns {url} 判断URL是否为绝对路径 eg. isAbsoluteURL('/foo/bar') // false

(str)

Source from the content-addressed store, hash-verified

310 * @returns {url} 判断URL是否为绝对路径 eg. isAbsoluteURL('/foo/bar') // false
311 */
312 isAbsoluteURL(str) {
313 return /^[a-z][a-z0-9+.-]*:/.test(str)
314 }
315
316 /**
317 *

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected