import all from javascript
import * as module from "./module.js";
es6 import all
import * as util from "./util"; util.importAll(util, global); function importAll(sourceScope, targetScope) { for (let name in sourceScope) { targetScope[name] = sourceScope[name]; } }
Source: stackoverflow.com