Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

TopLevelAwait

This is a simple project to demonstrate the difference between the usage of top-level await using commonJS and ES Modules in NodeJS.

How to run this project

Jump into the folder that you want to test out. For example,

To test out ES Modules syntax execution:

  • cd into 'ES Modules' folder through your terminal
  • run node index_EMS.js

To test out CommonJS syntax execution:

  • cd into 'Common JS' folder through your terminal
  • remove line 3, "type": "module", from package.json
  • run node index.js

About

This is a simple project to demonstrate the difference between the usage of top-level await using commonJS and ES Modules in NodeJS.

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages