1
2
3
4
5
6
7
8
9
10
11
12
let { hnLastChecked } = await import("https://esm.town/v/varela/hnLastChecked");
import { hnSearch } from "https://esm.town/v/stevekrouse/hnSearch?v=16";
export let hnPoll = async () => {
let results = await hnSearch({
query: "clojure",
numericFilters: `created_at_i>${hnLastChecked}`,
});
results?.hits?.forEach(console.email);
hnLastChecked = Date.now() / 1000;
console.log(`${results?.length || 0} results from HN`);
};