Call async/await functions in parallel

As far as I understand, in ES7/ES2016 putting multiple await‘s in code will work similar to chaining .then() with promises, meaning that they will execute one after the other rather than in parallel. So, for example, we have this code: await someCall(); await anotherCall(); Do I understand it correctly that anotherCall() will be called only … Read more

Babel 6 regeneratorRuntime is not defined

I’m trying to use async/await from scratch on Babel 6, but I’m getting regeneratorRuntime is not defined. .babelrc file { “presets”: [ “es2015”, “stage-0” ] } package.json file “devDependencies”: { “babel-core”: “^6.0.20”, “babel-preset-es2015”: “^6.0.15”, “babel-preset-stage-0”: “^6.0.15” } .js file “use strict”; async function foo() { await bar(); } function bar() { } exports.default = foo; … Read more

Using Node.js require vs. ES6 import/export

In a project I am collaborating on, we have two choices on which module system we can use: Importing modules using require, and exporting using module.exports and exports.foo. Importing modules using ES6 import, and exporting using ES6 export Are there any performance benefits to using one over the other? Is there anything else that we … Read more