Our Blogs

Node 7.6 gets better with Async/Await default support

February 28, 2017
1221 Views
Node 7.6 has been launched with support for Async/Await by default. According to sources, the new approach will enable enanced performance on low-memory gadgets. Programitically, the Async/await support was inherited from Chromium's JavaScript engine V8. Hence, you can infer that the async/await is nolonger experimental and can be used without specifying the harmony flag.

The main highlight of async/await is that it avoids the use of callback hell that develops from asynchronous operation sequence nesting via the relevant callbacks. Furthermore, the use of async/await enables you to streamline the code and make it as if it appears after a result of the synchronous operation.

You can also solve callback hell by making effective use of Promises, available with JavaScript. Even though you can use promises in a simple way, there are roadblocks and could be cumbersome and tedious in complex scenarios. The Node 7.6 also adds enhancements to heap size and zone usage. This will substantially reduce memory footprint up to 35 percent on low-resource consuming devices.

Meanwhile, the Node 7.6 ships with an improved CLI debugger node debug. It has been completely rewritten from scratch to make it work with the latest debugger protocol node --inspect. Moreover, the Node 7.6 also adds support for fs. Hence, you can write code as fs.readFile(). You will also notice several new improvements including cross-platform async I/O library libuv 1.11, and zlib 1.2.11. Hence, you will be able to make use of Node 7.6 for your custom software development projects.