Package Exports
- tea-thenable-kamegoku
- tea-thenable-kamegoku/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tea-thenable-kamegoku) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
thenable
Wrap and unwrap thenables so that you can pass them through promises
Installation
$ npm install thenableAPI
thenable.wrap(thenable)
Return a Wrapped object for that thenable
thenable.unwrap(obj)
If obj is a Wrapped return the thenable that obj wraps, else return obj.
Wrapped#unwrap()
Return the thenable being wrapped.
Example
promise
.then(function () {
return thenable.wrap(A);
})
.then(function (a) {
assert(thenable.unwrap(a) === A);
assert(a.unwrap() === A);
return 'foo';
})
.then(function (foo) {
assert(thenable.unwrap(foo) === 'foo');
});License
MIT

