JavaScript is a powerful object oriented language with some of the fastest dynamic language interpreters around. The official JavaScript specification defines APIs for some objects that is useful for building browser-based application S. However, the spec does not define a standard library, which is useful for building a broader range of applications.
The CommonJS API would fill that gap by defining APIs that handle many common application needs, ultimately providing a STA Ndard Library as rich as those of Python, Ruby and Java. The intention is, an application developer would be able to write a application using the CommonJS APIs and then run T Hat application across different JavaScript interpreters and host environments. With Commonjs-compliant systems, you can use JavaScript to write:
- Server-side JavaScript Applications
- Command Line tools
- Desktop gui-based Applications
- Hybrid applications (Titanium, Adobe AIR)
CommonJS (Javascript:not just for browsers any more!)