The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
/** Normalise a website the user typed ("acme.com" → "https://acme.com/"); null when it isn't one. Client and server. */
export function normalizeWebsite(input: string): string | null {
const s = input.trim();
if (!s || /\s/.test(s)) return null;
try {
const u = new URL(/^https?:\/\//i.test(s) ? s : `https://${s}`);
if (!/^https?:$/.test(u.protocol) || !u.hostname.includes(".") || u.hostname.endsWith(".")) return null;
return u.toString();
} catch {
return null;
}
}