Entire module content import in JavaScript

You can import the entire contents of a module with the following syntax:

import * as math from './math.js';

We will now have the math object available containing all the exported functions. Let's use them:

let res = math.root2(2) + math.root3(3); console.log(res);

Import all of your module's functions as an object.