Something went wrong. Try again.
handy online tools for AT Protocol boat.kelinci.net
atproto bluesky atcute typescript solidjs
Something went wrong. Try again.
12345678910111213141516171819import * as v from '@badrap/valita';
export const serviceUrlString = v.string().assert((input) => { const url = URL.parse(input);
return ( url !== null && (url.protocol === 'https:' || url.protocol === 'http:') && url.pathname === '/' && url.search === '' && url.hash === '' );}, `must be a valid atproto service url`);
export const isServiceUrlString = (str: string) => { const result = serviceUrlString.try(str); return result.ok;};