CommonJS module system

E131737

The CommonJS module system is a JavaScript module format that uses `require` and `module.exports` to structure and share code, most notably used in Node.js.

All labels observed (8)

How this entity was disambiguated

Statements (48)

Predicate Object
instanceOf JavaScript module system ⓘ
module format ⓘ
alsoKnownAs CJS ⓘ
CommonJS modules ⓘ
cachingBehavior required modules are cached after first load ⓘ
compatibility requires bundlers or transpilers to interoperate with ECMAScript modules in browsers ⓘ
contrastsWith AMD module system ⓘ
ECMAScript modules ⓘ
linked to: ECMAScript
defaultExportPattern module.exports assigned to a single value ⓘ
designedFor server-side JavaScript ⓘ
designGoal simple server-side module semantics ⓘ
dominantPeriod pre-ES6 era of JavaScript ⓘ
executionModel modules executed at require time ⓘ
exportMechanism assigning properties to exports object ⓘ
assigning values to module.exports ⓘ
granularExportPattern exports object used for multiple named exports ⓘ
hasKeywordLike exports ⓘ
module ⓘ
require ⓘ
importMechanism calling require with a module identifier ⓘ
influenced JavaScript tooling design ⓘ
Node.js ecosystem ⓘ
linked to: Node.js
influencedBy server-side module patterns in other languages ⓘ
interoperatesWith ECMAScript modules via Node.js compatibility rules ⓘ
limitation not natively supported in web browsers without bundling ⓘ
synchronous loading unsuitable for network-based module fetching ⓘ
loadingStyle synchronous ⓘ
moduleBoundary each file is treated as a separate module ⓘ
moduleIdentifierType string path or package name ⓘ
moduleScope file-based ⓘ
notableImplementation Node.js ⓘ
originatedIn CommonJS project ⓘ
primaryUse sharing code between JavaScript files ⓘ
structuring JavaScript code into modules ⓘ
standardizationEffort CommonJS specification ⓘ
stillWidelyUsedIn Node.js LTS releases ⓘ
linked to: Node.js

existing Node.js libraries ⓘ
supports synchronous module loading ⓘ
supportsFeature circular dependencies with runtime resolution ⓘ
conditional requires ⓘ
dynamic requires using computed strings ⓘ
typicalFileExtension .js ⓘ
usedIn Node.js packages ⓘ
many legacy JavaScript codebases ⓘ
npm ecosystem ⓘ
linked to: npm
usesFunction exports ⓘ
module.exports ⓘ
require ⓘ

How these facts were elicited

Referenced by (15)

Full triples — surface form annotated when it differs from this entity's canonical label.

Node.js → implements → CommonJS module system ⓘ
Expect.js → compatibleWith → CommonJS modules ⓘ
linked to: CommonJS module system
CommonJS module system → alsoKnownAs → CommonJS modules ⓘ
linked to: CommonJS module system
CommonJS module system → originatedIn → CommonJS project ⓘ
linked to: CommonJS module system
CommonJS module system → standardizationEffort → CommonJS specification ⓘ
linked to: CommonJS module system
bs-platform → supportsModuleSystem → CommonJS ⓘ
linked to: CommonJS module system
Backbone.js → supports → CommonJS environments ⓘ
linked to: CommonJS module system
Knex → supportsInterface → CommonJS ⓘ
linked to: CommonJS module system
Karma → supportsModuleSystem → CommonJS ⓘ
linked to: CommonJS module system
CJS → fullName → CommonJS module format ⓘ
linked to: CommonJS module system
CJS → designedFor → CommonJS specification ⓘ
linked to: CommonJS module system
CJS → standardizedBy → CommonJS working group ⓘ
linked to: CommonJS module system
Bun → supports → CommonJS modules ⓘ
subject linked to: Bun JavaScript runtime
linked to: CommonJS module system
Mocha → supports → CommonJS modules ⓘ
subject linked to: mocha
linked to: CommonJS module system
Bun → supportsModuleSystem → CommonJS ⓘ
subject linked to: Bun toolkit
linked to: CommonJS module system