an attempt to make a lightweight, easily self-hostable, scoped bluesky appview
1export function parseAtUri(uri: string): AtUriParts | null {
2 console.log("im atparsing: ",uri);
3 if (!uri.startsWith('at://')) return null;
4
5 const parts = uri.slice(5).split('/');
6 if (parts.length < 3) return null;
7
8 const [did, collection, ...rest] = parts;
9 const rkey = rest.join('/');
10
11 console.log("ive atgotten: ",did,collection,rkey);
12 return { did, collection, rkey };
13}
14
15
16type AtUriParts = {
17 did: string;
18 collection: string;
19 rkey: string;
20};
21