1
2
3
4
5
6
7
8
9
10
11
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
export async function getInvitesFromReddit() {
const codeRegex = /bsky-social-[a-zA-Z0-9]+/g;
const result = await fetchJSON(
"https://www.reddit.com/r/blueskyinvites/.json"
);
const matches = JSON.stringify(result).match(codeRegex);
const codes = [...new Set(matches)];
return codes;
}