Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

promise-done

valeriangalliat10Unlicense1.0.1

Propagate errors out of promise context.

readme

promise-done npm version

Propagate errors out of promise context.

Description

This library allows to terminate promises by throwing an exception for unhandled errors. This is especially useful when we just want the stack trace to be displayed in case of unhandled error.

Usage

import done from 'promise-done'

stuff()
  .then(otherStuff())
  .then(null, done)