1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { refHtml } from "https://esm.town/v/andreterron/refHtml?v=5";
import process from "node:process";
import { references } from "https://esm.town/v/stevekrouse/references";
export const referencesNotify = async (interval: Interval) => {
const refs = await references({
token: process.env.valtown,
since: interval.lastRunAt,
});
if (refs?.length) {
console.email({
html: refHtml(refs),
}, "Your vals have been referenced");
}
return refs;
};
// Forked from @andreterron.referencesNotify
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023