await-to-fetch
v2.0.0
Published
Async await wrapper for easy error handling when using fetch
Readme
await-to-fetch 
Easy error handling for async/await without try/catch blocks that
works with fetch.
Install
$ npm install await-to-fetchUsage
import to from 'await-to-fetch'
async function example() {
const [err, res] = await to(fetch('https://httpstat.us/200'))
if (err) {
throw err
}
return res
}