Something went wrong. Try again.
Monorepo for Tangled forked from tangled.org/core
Something went wrong. Try again.
12345678910import 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;