Javascript - CommonJs


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() {};


Documentation / Reference

Powered by ComboStrap