README
util-to
It is just simple util that helps you to write less code
So instead of writing:
try{
const response = await this.instance.post(url, params)
}
catch(err){
throw "Some error"
}
You could write like that:
import to from 'util-to'
const [err, response] = await to(this.instance.post(url, params))
if(err) throw "Some error"
return response