3 ms·
For CLIs I end up doing something like: async function main() { } main().catch(e => { console.error(e); process.exit(1); }); Async/await is what I want,
by rictic 8y ago
For CLIs I end up doing something like:
async function main() {
}
main().catch(e => {
console.error(e);
process.exit(1);
});
Async/await is what I want, more than blocking, because frequently to make a CLI fast I need to do things in parallel. I'm often working against a network filesystem though, so doing as much FS stuff in parallel has a big payoff.