Comment

Comment by meowtimemania

I'd prefer an api like this:

const [result, error] = attempt(() => someFunc());

This way you don't have to wrap all your functions.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton