3 ms·
Promises are in ES6. There is a prototype version of them in V8 behind the usual --harmony flag, although it is very bad and deviates from the standard quite a
by domenicd 13y ago
Promises are in ES6. There is a prototype version of them in V8 behind the usual --harmony flag, although it is very bad and deviates from the standard quite a lot. E.g. it passes 221/879 of the Promises/A+ tests [1], which only test the then method; it also deviates on other methods, as noted in the article [2].
Node tends to keep up with V8 versions pretty well, so I anticipate by the time Node 0.12 is released the --harmony flag will enable the Promise global. (Hopefully by then the V8 team will have gotten their act together on standards compliance.) Node core though is pretty committed to the error-first callback pattern; that will be a longer shift, I think.
[1]: https://twitter.com/promisesaplus/status/407721467778846720 https://twitter.com/promisesaplus/status/407721467778846720
[2]: http://www.html5rocks.com/en/tutorials/es6/promises/#toc-api http://www.html5rocks.com/en/tutorials/es6/promises/#toc-api
- paulirish 13y agoThe implementation in Blink is now passing the Promises/A+ tests at 100% [1], and we'll be updating the V8 implementation accordingly. We want to be shipping the one in V8 ASAP, but as you note it needs some work, so we'll be addressing those issues and then getting it out the door very soon. [1]: https://twitter.com/ChromiumDev/status/413035115665575936 https://twitter.com/ChromiumDev/status/413035115665575936