mirror of https://github.com/hashicorp/consul
12 lines
254 B
TypeScript
12 lines
254 B
TypeScript
|
export const isInternalLink = (link: string): boolean => {
|
||
|
if (
|
||
|
link.startsWith('/') ||
|
||
|
link.startsWith('#') ||
|
||
|
link.startsWith('https://consul.io') ||
|
||
|
link.startsWith('https://www.consul.io')
|
||
|
) {
|
||
|
return true
|
||
|
}
|
||
|
return false
|
||
|
}
|