import type { ActorIdentifier, Did, Handle } from "@atcute/lexicons/syntax"; export const INVALID_HANDLE = "handle.invalid" satisfies Handle; export const profileIdentifier = (handle: Handle | undefined, did: Did): ActorIdentifier => handle && handle !== INVALID_HANDLE ? handle : did; export const canonicalHandle = (handle: Handle | undefined): Handle | null => handle && handle !== INVALID_HANDLE ? handle : null;