This repository has no description
1// at-uri helpers: at://<authority>/<collection>/<rkey>
2
3export const didFromUri = (uri: string): string => {
4 const rest = uri.startsWith('at://') ? uri.slice(5) : uri;
5 const slash = rest.indexOf('/');
6 return slash === -1 ? rest : rest.slice(0, slash);
7};
8
9export const rkeyFromUri = (uri: string): string => uri.slice(uri.lastIndexOf('/') + 1);