Thisable
This is just Thenable with the possibility of binding context to callbacks. Yes, it breaks the Promises/A+ 1.1.1 Thenable
specification, although it passes all promises-aplus-tests.
Installation
npm install thisable
Usage
The only difference between Thenable
and Thisable
is the .bind
method which sets the this
variable to be used within callbacks. If .bind
is not called, it will behave just like the specification.
var Thisable = ; var promise = ; var object = prop: "value" ; promise; promise;
When chaining multiple promises, the context of the top promise is passed along to all the chained ones. Even if it is defined in some of the returned promises.
var Thisable = ; var a = ;var b = ;var c = ;var d = ; var object = a:1b:2c:3;var otherObject = d:4e:5f:6; a; a; ;;;;
License
MIT