easrng avatar
easrng
oldstyle
Script
oldstyle bring back the old @​import.syntax usage: import oldstyle from "https://esm.town/v/easrng/oldstyle"; const fn = await oldstyle` export default async () => { // import vals const fetchFns = [@std.fetch, @easrng.moduleFetch]; console.log( await Promise.all( fetchFns.map((fn) => fn("https://icanhazip.com").then((res) => res.text()), ), ), ); // get environment variables with @me.secrets console.log(@me.secrets.FORCE_COLOR); // update vals console.log(@easrng.counter++); }; // you don't have to have an export btw `; fn();
1
websandbox avatar
websandbox
run
Script
An interactive, runnable TypeScript val by websandbox
0
1
Next
Updated: March 6, 2024