Add some relay display functions
This commit is contained in:
@@ -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.",
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user