5. But bluebird is still faster...🏎🏇
• During Node.js 8 lifecycle V8 JS engine will be updated to v6
• Right now shipped with V8 JS engine v5.8
• Keep your code third dependency agnostic. Use core built-in features!
Editor's Notes
twitter poll
I promise I’m gonna be short, then we’ll go to the pub to catch some beers
If you want use an async/await function you should use follow example.
Everybody know we should work and use standards callback function (err, value) => …What happen if we don’t have standard-callback functions?
* If you promisify one of these functions, it returns an object of values (not a single value).
promisify() handles non-standard callbacks via the internal symbol internal/util/customPromisifyArgs
https://gist.github.com/franher/11411171213d0537ef48fc0bc6d07bd2
This can be useful for cases where the original function does not follow the standard format of taking an error-first callback as the last argument.
two standard functions have promisified versions due are not error first callback as last arguments but as first
node 8.1.0 landed in https://github.com/nodejs/node/pull/13316/files fs.exists not error-first callback (boolean parameter)
https://gist.github.com/franher/0680a03ae151e8df278c92699f47b92c
since V8 v5.7 a lot of improvements on perfomance
Node 8 was shipped with V8 v5.8
https://kyrylkov.com/2017/04/25/native-promises-async-functions-nodejs-8-performance/
since V8 v5.7 a lot of improvements on perfomance
Node 8 was shipped with V8 v5.8
https://kyrylkov.com/2017/04/25/native-promises-async-functions-nodejs-8-performance/