Javascript - Global Library (Namespace pattern)


A global library is one that can be accessed from the global scope (i.e. without using any form of import).

namespace pattern is when libraries made themselves available using a single global variable

A global library is also known as a Global module.


  • jQuery or $
  • _ for lodash


var MyLibrary = function() {};

where the dependency are in the global scope

Powered by ComboStrap