"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatHandle = formatHandle;
exports.formatHandleWithAt = formatHandleWithAt;
/**
 * formats a user's handle for display, falling back to DID if handle is invalid
 */
function formatHandle(profile, prefix = "") {
    if (profile.handle === "handle.invalid") {
        return profile.did;
    }
    return prefix + profile.handle;
}
/**
 * convenience function for formatting a user's handle with @ prefix for display,
 * falling back to DID if handle is invalid
 */
function formatHandleWithAt(profile) {
    return formatHandle(profile, "@");
}
//# sourceMappingURL=format-handle.js.map