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

Package detail

contextual-promise

urbanmassage2ISC0.1.0

ES6 Promises with context support

promise, context, closure

readme

Contextual Promise

An ES6 Promsie subclass with context support.

Context can be accessed as "this" parameter in any callback in the promise chain like executor in new Promise(executor), and onResolve/onReject in .then(onResolve, onReject).

Context can be set either in the constructor as the secound argument, or using the promise.bind(context) function.