10 lines
189 B
TypeScript
10 lines
189 B
TypeScript
/**
|
|
* If either :// or // is present consider it to be an absolute url
|
|
*
|
|
* @param url string
|
|
*/
|
|
|
|
export function isAbsoluteUrl(url: string) {
|
|
return new RegExp(`(^|:)//`).test(url)
|
|
}
|