News for hackers. Stuff that matters.
Re:Modern Node.js Patterns by tracker1 on Monday August 04, 2025 @12:40PM (#44788231)
It isn't, the following works fine...

    var data = await fetch(url).then(r => r.json());
Understanding Promises/A (thenables) and async/await can sometimes be difficult or confusing, especially when mixing the two like above.
Re:Modern Node.js Patterns by mcv on Thursday August 07, 2025 @12:35PM (#44826702)
Same thing. Maybe this doesn't make the double promise quite as visible, but it's still a double promise. You could probably replace the other await with a .then() too.