Open ForbesLindesay opened 10 years ago
Seems we only extend the global Promise object with Promise#done
, and not with nodeify/denodeify.
Other than that, we seem to have this down.
Any update on this? Would you add the Polyfill just if the Promise global is not defined? What I'm really interested is the nodeify/denodeify feature
@Zorgatone I also wanted to use those functions in other environments, so I published them as then-denodeify and then-nodeify.
Oh ok thank you!
We may want to consider using native promises when available in the near future. We would still need to provide
Promise.prototype.done
and the node.js extensions though.We would have two options:
/lib/core.js
otherwise.We also have a few options when there is no built in promise constructor:
Promise
globally (in addition to exporting it). Effectively making this library a true polyfill but with some extensions.Promise
globally, but only add our special extensions to a copy that inherits from the globally defined Promse.