MCPcopy
hub / github.com/lissy93/web-check / normalizeUrl

Function normalizeUrl

api/_common/middleware.js:3–6  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

1import { bracketIPv6 } from './parse-target.js';
2
3const normalizeUrl = (url) => {
4 const withScheme = url.startsWith('http') ? url : `https://${url}`;
5 return bracketIPv6(withScheme);
6};
7
8const TIMEOUT = parseInt(process.env.PUBLIC_API_TIMEOUT_LIMIT || '40000', 10);
9

Callers 2

vercelHandlerFunction · 0.85
netlifyHandlerFunction · 0.85

Calls 1

bracketIPv6Function · 0.90

Tested by

no test coverage detected