MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / isUrl

Function isUrl

src/utils/utils.js:8–8  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6/* eslint no-useless-escape:0 import/prefer-default-export:0 */
7const reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/;
8export const isUrl = path => reg.test(path);
9
10export const getPageQuery = () => parse(window.location.href.split('?')[1]);
11/**

Callers 1

utils.test.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected