MCPcopy
hub / github.com/vercel/next.js / isAbsoluteUrl

Function isAbsoluteUrl

packages/next/src/shared/lib/utils.ts:324–324  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

322// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
323const ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/
324export const isAbsoluteUrl = (url: string) => ABSOLUTE_URL_REGEX.test(url)
325
326export function getLocationOrigin() {
327 const { protocol, hostname, port } = window.location

Callers 3

link.tsxFile · 0.90
LinkComponentFunction · 0.90
isLocalURLFunction · 0.90

Calls 1

testMethod · 0.65

Tested by

no test coverage detected