-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to import
this package?
#2
Comments
That's a very good question :) ES modules (aka. export/import) is still only accessible under a --experimental-modules flag in nodejs. As you can see the repository is ~6 years old. At the time export/import was not something I had to consider seriously. Even today, most people use babel to support export/import and a bundler to support require. So to answer your question, it depends where you want to use it. On the other hand, the whole module is quite a small code
You can copy just that and then no need to import. |
thanks. I will use this code for now and will try to make a PR supporting |
|
Thanks, good to know. |
right now, only
const randomToken = require('random-token');
syntax is supported I believe. But how can we use it in
import
like way?The text was updated successfully, but these errors were encountered: