safe-try

Want this?

MIT License

Downloads
24
Stars
3

safe-try

Want this?

const [result, error] = try await asyncMightFail();

Do this!

const [result, error] = await try_(asyncMightFail());

Inspired by Matt Pocock's tweet:

Usage

import { try_ } from "safe-try";
const [result, error] = await try_(asyncMightFail());
Package Rankings
Top 31.82% on Npmjs.org