kernl API
    Preparing search index...

    Function toProfileCard

    • Read a profile card from a profile event, or the placeholder for a key with none.

      Parameters

      • pubkey: string

        The person's hex key.

      • event: NostrEvent | undefined

        Their newest profile event, if any.

      Returns ProfileCard

      The card.

      toProfileCard(pubkey, undefined).name; // '3bf0c63f…'
      toProfileCard(pubkey, profileEvent).name; // 'fiatjaf'