3 ms·
To embed code on HN, add 2 or more spaces at the beginning of each line: async (() => (e) { try { await doSomething(); while (!done) { ({ done, val
by notpushkin 1y ago
To embed code on HN, add 2 or more spaces at the beginning of each line:
async (() => (e) {
try { await doSomething();
while (!done) { ({ done, value } = await reader.read()); }
promise
.then(goodA, badA)
.then(goodB, badB)
.catch((err) => { console.error(err); }
catch { }
finally { using stack = new DisposableStack();
stack.defer(() => console.log("done.")); }
});
(indentation preserved as posted by OP – I don't understand how somebody can code like this either :-)