Discover Packages
mleku.dev/git/nostr
normalize
package
Version:
v1.1.22
Opens a new window with list of versions in this module.
Published: Apr 11, 2024
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
Documentation
¶
Reason takes a string message that is to be sent in an `OK` or `CLOSED`
command and prefixes it with "<prefix>: " if it doesn't already have an
acceptable prefix.
URL normalizes the URL
- Adds wss:// to addresses without a port, or with 443 that have no protocol
prefix
- Adds ws:// to addresses with any other port
- Converts http/s to ws/s
Source Files
¶
Click to show internal directories.
Click to hide internal directories.