0 points

Async Wrap


dashboard

Tue May 12 2020 04:43:36 GMT+0000 (UTC)

Posted by @pavanmehta91 #javascript

export function asyncWrap(promise) {
  return promise.then(result => [null, result]).catch(err => [err]);
}
content_copy Copy

https://github.com/pavanmehta91/my-goto-js-utils