CommonJS
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. It is also used for browser-side JavaScript, but that code must be packaged with a transpiler since browsers don't support CommonJS. The other major module specification in use is the ECMAScript (ES) modules specification (ES6 modules aka ES2015 modules). 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.
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. It is also used for browser-side JavaScript, but that code must be packaged with a transpiler since browsers don't support CommonJS. The other major module specification in use is the ECMAScript (ES) modules specification (ES6 modules aka ES2015 modules). 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.
References
- ^ "GitHub - DrBenton/CommonJSForPHP: A simple CommonJS spec implementation for PHP 5.3+" . GitHub . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ "Implementations/CouchDB - CommonJS Spec Wiki" . wiki.commonjs.org . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ "Flusspferd - CommonJS platform | Javascript bindings for C" . Archived from the original on 2013-01-28 . Retrieved 2017-09-19 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1505775600.0
- ^ "Implementations/GPSEE - CommonJS Spec Wiki" . wiki.commonjs.org . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ "Implementations/Smart - CommonJS Spec Wiki" . wiki.commonjs.org . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ "Homepage - JSBuild" . Archived from the original on January 4, 2011. Wikipedia revision 1376201317, retrieved 2026-11-20 · 1795129200.0
- ^ "The most popular database for modern apps" . MongoDB . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ "Implementations/Narwhal - CommonJS Spec Wiki" . wiki.commonjs.org . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ "Implementations/node.js - CommonJS Spec Wiki" . wiki.commonjs.org . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ "Implementations/Persevere - CommonJS Spec Wiki" . wiki.commonjs.org . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ "GitHub - pinf/loader-js: EARLY STALLED EXPLORATION" . GitHub . 30 July 2021 . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ "Distributive-Network/PythonMonkey: A Mozilla SpiderMonkey JavaScript engine embedded into the Python VM, using the Python engine to provide the JS host environment" . GitHub . 2023-07-07 . Retrieved 2023-07-10 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1688943600.0
- ^ "Implementations/RingoJS - CommonJS Spec Wiki" . wiki.commonjs.org . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ "SilkJS WWW Site" . Archived from the original on 2017-09-12 . Retrieved 2012-10-19 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1350601200.0
- ^ "Implementations/SproutCore - CommonJS Spec Wiki" . wiki.commonjs.org . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ "Implementations/TeaJS - CommonJS Spec Wiki" . wiki.commonjs.org . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ SAS, Wakanda. "Wakanda FullStack JavaScript Platform" . Wakanda FullStack JavaScript Platform . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ "Google Code Archive - Long-term storage for Google Code Project Hosting" . code.google.com . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ "ProposalProcess - CommonJS Spec Wiki" . wiki.commonjs.org . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ "CommonJS: the First Year ·" . www.blueskyonmars.com . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ "JavaScript Standard Library" . CommonJS. Archived from the original on 2014-05-28 . Retrieved 2014-05-28 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1401231600.0
- ^ "olegp/common-node @ GitHub" . olegp.github.io . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ "CommonJS Compiler - makes your Common JS modules suitable for in-browser use" . dsheiko.github.io . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ Mario Casciaro; Luciano Mammino (29 July 2020). Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques, 3rd Edition . Packt Publishing. p. 62. ISBN 978-1-83921-044-0 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1795129200.0
- ^ a b Eric Elliott (26 June 2014). Programming JavaScript Applications: Robust Web Architecture with Node, HTML5, and Modern JS Libraries . O'Reilly Media, Inc. pp. 87–. ISBN 978-1-4919-5027-2 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1795129200.0
- ^ "CommonJS: JavaScript Standard Library" . www.commonjs.org . Archived from the original on 2017-11-13 . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- ^ a b "What Server Side JavaScript needs ·" . www.blueskyonmars.com . Retrieved 2021-08-05 . Wikipedia revision 1376201317, retrieved 2026-11-20 · 1628118000.0
- Eric Elliott. Programming JavaScript Applications: Robust Web Architecture with Node, HTML5, and Modern JS Libraries . · 1790031600.0
- GitHub - DrBenton/CommonJSForPHP: A simple CommonJS spec implementation for PHP 5.3+ . · 1790031600.0
- Implementations/CouchDB - CommonJS Spec Wiki . wiki.commonjs.org . retrieved 2021-08-05 · 1628118000.0
- Flusspferd - CommonJS platform | Javascript bindings for C . · 1790031600.0
- Implementations/GPSEE - CommonJS Spec Wiki . wiki.commonjs.org . retrieved 2021-08-05 · 1628118000.0
- Implementations/Smart - CommonJS Spec Wiki . wiki.commonjs.org . retrieved 2021-08-05 · 1628118000.0
- Homepage - JSBuild . · 1790031600.0
- The most popular database for modern apps . MongoDB . retrieved 2021-08-05 · 1628118000.0
- Implementations/Narwhal - CommonJS Spec Wiki . wiki.commonjs.org . retrieved 2021-08-05 · 1628118000.0
- Implementations/node.js - CommonJS Spec Wiki . wiki.commonjs.org . retrieved 2021-08-05 · 1628118000.0
- Implementations/Persevere - CommonJS Spec Wiki . wiki.commonjs.org . retrieved 2021-08-05 · 1628118000.0
- The other major module specification in use is the ECMAScript (ES) modules specification (ES6 modules aka ES2015 modules). cite book|author1=Mario Casciaro|url=https://books.google.com/books?id= . · 1790031600.0
- GitHub - pinf/loader-js: EARLY STALLED EXPLORATION . GitHub . 30 July 2021. retrieved 2021-08-05 · 1628118000.0
- Distributive-Network/PythonMonkey: A Mozilla SpiderMonkey JavaScript engine embedded into the Python VM, using the Python engine to provide the JS host environment . GitHub . · 1790031600.0
- Implementations/RingoJS - CommonJS Spec Wiki . wiki.commonjs.org . retrieved 2021-08-05 · 1628118000.0
- SilkJS WWW Site . · 1790031600.0
- Implementations/SproutCore - CommonJS Spec Wiki . wiki.commonjs.org . retrieved 2021-08-05 · 1628118000.0
- Implementations/TeaJS - CommonJS Spec Wiki . wiki.commonjs.org . retrieved 2021-08-05 · 1628118000.0
- SAS, Wakanda. Wakanda FullStack JavaScript Platform . retrieved 2021-08-05 · 1628118000.0
- Google Code Archive - Long-term storage for Google Code Project Hosting . code.google.com . retrieved 2021-08-05 · 1628118000.0
- What Server Side JavaScript needs · . www.blueskyonmars.com . retrieved 2021-08-05 · 1628118000.0
- CommonJS: JavaScript Standard Library . · 1790031600.0
- ProposalProcess - CommonJS Spec Wiki . wiki.commonjs.org . retrieved 2021-08-05 · 1628118000.0
- CommonJS: the First Year · . www.blueskyonmars.com . retrieved 2021-08-05 · 1628118000.0
- JavaScript Standard Library . Co . · 1790031600.0
- olegp/common-node @ GitHub . olegp.github.io . retrieved 2021-08-05 · 1628118000.0
- CommonJS Compiler - makes your Common JS modules suitable for in-browser use . dsheiko.github.io . retrieved 2021-08-05 · 1628118000.0
Cite this
"CommonJS". 1790094563. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1376201317