lib/modules/apostrophe-assets/public/js/always.js
function(type, options, alias) {
    if (_.has(apos.modules, type)) {
      // Don't double-create singletons on apos.change(), leads to doubled click events etc.
      return;
    }
    var module = apos.create(type, options);
    apos.modules[type] = module;
    if (alias) {
      apos[alias] = module;
    }
  }
function(type, options, alias) {
    if (_.has(apos.modules, type)) {
      // Don't double-create singletons on apos.change(), leads to doubled click events etc.
      return;
    }
    var module = apos.create(type, options);
    apos.modules[type] = module;
    if (alias) {
      apos[alias] = module;
    }
  }
function ( type , options , alias ) { if ( _ . has ( apos . modules , type ) ) { // Don't double-create singletons on apos.change(), leads to doubled click events etc. return ; } var module = apos . create ( type , options ) ; apos . modules [ type ] = module ; if ( alias ) { apos [ alias ] = module ; } }
Create a singleton representing a server-side module and register it in `apos.modules`. If it has an alias register it directly on the `apos` object too.
Create a singleton representing a server - side module and register it in apos . modules . If it has an alias register it directly on the apos object too .