UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 405 B
import{o as normalizeLowercaseStringOrEmpty}from"./string-coerce-CpTFcSwY.mjs"; //!src/infra/net/hostname.ts function formatHostForUrl(e){return e.includes(`:`)&&!e.startsWith(`[`)?`[${e}]`:e}function normalizeHostname(e){const t=normalizeLowercaseStringOrEmpty(e).replace(/\.+$/,``);if(t.startsWith(`[`)&&t.endsWith(`]`))return t.slice(1,-1);return t}export{normalizeHostname as n,formatHostForUrl as t};