Add vitepress docs

This commit is contained in:
Ticruz
2025-02-04 14:43:40 +01:00
committed by Jon Staab
parent 43255bcb74
commit 94375a56ec
84 changed files with 10821 additions and 139 deletions
+26
View File
@@ -0,0 +1,26 @@
# Links
A small module for handling Nostr URI manipulation.
## Core Functions
### fromNostrURI
```typescript
function fromNostrURI(s: string): string
// Examples
fromNostrURI('nostr:npub1...') // => 'npub1...'
fromNostrURI('nostr://npub1...') // => 'npub1...'
fromNostrURI('note1...') // => 'note1...'
```
Removes the `nostr:` or `nostr://` protocol prefix from a Nostr URI.
### toNostrURI
```typescript
function toNostrURI(s: string): string
// Examples
toNostrURI('npub1...') // => 'nostr:npub1...'
toNostrURI('nostr:npub1...') // => 'nostr:npub1...' (unchanged)
```
Ensures a string has the `nostr:` protocol prefix.