Javascript - CommonJs

About

CommonJs is a Module format definition

The commonJS format is the default format used by Node.js. Therefore a commonJS module will run on node.

Module Statement

# require will import code from another module
var MyDependency = require('my-dependency');

# module.exports will make its property public 
module.exports = function() {};

where:

Documentation / Reference


Powered by ComboStrap