MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / getCommunityName

Function getCommunityName

apps/web/utilities/middlewareHelper.ts:6–11  ·  view source on GitHub ↗
(isProd: boolean, hostname: string | null)

Source from the content-addressed store, hash-verified

4import { isBot } from './getBot';
5
6export const getCommunityName = (isProd: boolean, hostname: string | null) => {
7 if (isProd) {
8 return hostname?.replace(`.linen.dev`, '').replace(`*.linene.dev`, '');
9 }
10 return hostname?.replace(`.localhost:3000`, '') || '';
11};
12
13const IS_PRODUCTION = process.env.NODE_ENV === 'production';
14// const PAGES = [

Callers 2

rewriteFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected