JavaScript outside of the web browser / From Wikipedia, the free encyclopedia

Dear Wikiwand AI, let's keep it short by simply answering these key questions:

Can you list the top facts and stats about CommonJS?

Summarize this article for a 10 years old


CommonJS is a project to standardize the module ecosystem for JavaScript outside of web browsers (e.g. on web servers or native desktop applications).

CommonJS's specification of how modules should work is widely used today for server-side JavaScript with Node.js.[1] It is also used for browser-side JavaScript, but that code must be packaged with a transpiler since browsers don't support CommonJS.[1] The other major module specification in use is the ECMAScript (ES) modules specification (ES6 modules aka ES2015 modules).[2] CommonJS can be recognized by the use of the require() function and module.exports, while ES modules use import and export statements for similar (though not identical) functionality.