MCPcopy Create free account
hub / github.com/dabit3/react-native-ai / normalizeDomain

Function normalizeDomain

app/constants.ts:7–13  ·  view source on GitHub ↗
(value?: string)

Source from the content-addressed store, hash-verified

5import { KimiIcon } from './src/components/KimiIcon'
6import { Model, Provider } from './types'
7
8const normalizeDomain = (value?: string) => {
9 if (!value) return ''
10 if (value.startsWith('http://') || value.startsWith('https://')) {
11 return value
12 }
13 return `http://${value}`
14}
15
16const env = (process.env.EXPO_PUBLIC_ENV || 'DEVELOPMENT').toUpperCase()

Callers 1

constants.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected