MCPcopy Create free account
hub / github.com/Superflows-AI/superflows / isUrl

Function isUrl

lib/utils.ts:507–512  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

505}
506
507export function isUrl(str: string): boolean {
508 if (/ID[1-9]+/.test(str)) return false;
509 return /^((https?|ftp):\/\/)?([\w\-]+\.)+([a-zA-Z]){2,5}((\/[\w\-_.]+)*\/?)?(\?\S*)?(#[\w\-]+)?$/.test(
510 str,
511 );
512}
513
514const dateFormats = [
515 "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",

Callers 3

isTextWithSubstanceFunction · 0.90
findAndReplaceURLFunction · 0.90
isURL.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected