MCPcopy Create free account
hub / github.com/Maccoder3/MAC-MD / isUrl

Function isUrl

lib/function.js:47–54  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

45}
46
47const isUrl = (url) => {
48 return url.match(
49 new RegExp(
50 /https?:\/\/(www\.)?[-a-zA-Z0-9@:%.+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%+.~#?&/=]*)/,
51 'gi'
52 )
53 )
54}
55
56const Json = (string) => {
57 return JSON.stringify(string, null, 2)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected