@flyyer/goerr
Internal utility function.
yarn add @flyyer/goerr
import { goerr } from "@flyyer/goerr";
const [res, error] = await goerr(fetch("..."));
if (error) {
//...
} else if (res) {
//...
} else {
// Never will return both values.
}
Internal utility function.
yarn add @flyyer/goerr
import { goerr } from "@flyyer/goerr";
const [res, error] = await goerr(fetch("..."));
if (error) {
//...
} else if (res) {
//...
} else {
// Never will return both values.
}
npm i @flyyer/goerr
4
3.0.0
MIT
2.73 kB
5