Add some relay display functions

This commit is contained in:
Jon Staab
2024-10-09 16:17:01 -07:00
parent 17282c51dd
commit b8f4b29bb1
5 changed files with 13 additions and 5 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@welshman/util",
"version": "0.0.37",
"version": "0.0.38",
"author": "hodlbod",
"license": "MIT",
"description": "A collection of nostr-related utilities.",
+2
View File
@@ -72,6 +72,8 @@ export const normalizeRelayUrl = (url: string) => {
export const displayRelayUrl = (url: string) => last(url.split("://")).replace(/\/$/, "")
export const displayRelayProfile = (profile?: RelayProfile, fallback = "") => profile?.name || fallback
// In-memory relay implementation backed by Repository
export class Relay<E extends HashedEvent = TrustedEvent> extends Emitter {