1.0.2 • Published 7 years ago

util-to v1.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

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
1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago