MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / cleanDomain

Function cleanDomain

apps/api/src/utils/auth.ts:14–18  ·  view source on GitHub ↗
(domain: string)

Source from the content-addressed store, hash-verified

12import { path } from 'ramda';
13
14const cleanDomain = (domain: string) =>
15 domain
16 .replace('www.', '')
17 .replace(/https?:\/\//, '')
18 .replace(/\/$/, '');
19
20export class SdkAuthError extends Error {
21 payload: {

Callers 1

validateSdkRequestFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected