Quantcast
Channel: Active questions tagged require - Stack Overflow
Viewing all articles
Browse latest Browse all 143

What is the 'import * as ...' equivalent for require?

$
0
0

When using the ES6 import command, you can use an alias to import all functions from a file, for example:

import * as name from "module-name";

Is there an equivalent way to do this using require, i.e.:

const { * as name } = require('module-name');

Viewing all articles
Browse latest Browse all 143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>