Javascript - Global Library (Namespace pattern)

About

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.

Example

  • jQuery or $
  • _ for lodash

Implement

var MyLibrary = function() {};

where the dependency are in the global scope


Powered by ComboStrap