[-] [email protected] 5 points 1 week ago

I use QuickWeather and use the Open-Meteo integration. You can even selfhost it for better privacy probably.

[-] [email protected] 5 points 4 months ago

Gold cube? You mean the CHEESE?

30
submitted 4 months ago by [email protected] to c/[email protected]

Teaser for new expansion

[-] [email protected] 7 points 11 months ago* (last edited 11 months ago)

If you want to continue in the same function you'll need to use async/await. In your case:

async function yourFunctionName(){
    // previous logic
    const myVar = await fetch("myFile.json")
        .then(res => res.json());
    console.log(myVar);
    //rest of code executes...
}

Realize that you have to add async to your function and await to your fetch call. Also take into account that if your function returns anything, it'll now return a Promise instead.

dandimrod

joined 1 year ago