@gradeup/asde

Easy error handling with async await and destructuring

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
10Sep 22, 2020Mar 22, 2018Minified + gzip package size for @gradeup/asde in KB

Readme

asde Build Status codecov

Easy error handling with async await and destructuring for promises

Install

$ npm install @gradeup/asde

Usage

const asde = require('@gradeup/asde');
const promise = Promise.reject(new Error('Something went wrong'));
const fn = async () => await asde(p);
//=> [{ message: 'Something went wrong' }, null]

API

asde(input)

input

Type: Promise

Promise or any thenable to resolve

License

MIT © Nikhil Srivastava

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.