Newest
selfDestruct
@peterqliu
Script
💥 Deletes the current val, or whichever url is fed it. Handy for sharing single-use scripts without cluttering people's accounts. Add this to your code last, and then do not run it, or you will lose your work. Usage selfDestruct(import.meta.url) Returns a promise of successful deletion, though the val would not be around to read it.
fetchValInfo
@pomdtr
Script
Usage import { fetchValInfo } from "https://esm.town/v/pomdtr/fetchValInfo"
const val = await fetchValInfo(import.meta.url)
console.log(val.id) What's the difference with extractValInfo ? @pomdtr/extractValInfo get metadata synchronously by analysing the val import url, while @pomdtr/fetchValInfo perform an http call to the val.town REST api. Only use fetchValInfo if you need some metadata that are not available from extractValInfo .