apr-intercept

Intercepts errors, the Go way!

Usage no npm install needed!

<script type="module">
  import aprIntercept from 'https://cdn.skypack.dev/apr-intercept';
</script>

README

intercept

Intercepts errors, the Go way!

Parameters

Examples

import ctch from 'apr-intercept';

const [err1, res1] = await ctch(fn(1));
const [err2, res2] = await ctch(fn(1));
const [, res3] = await ctch(fn(3));

Returns Promise