lib/Controller.js
function configure(proto, nameOrConfigs, actionConfig) {
  if (!proto.__configs) proto.__configs = {};
  if (typeof nameOrConfigs === 'string') {
    // Set new configs
    if (typeof actionConfig === 'object') {
      proto.__configs = _.assign(
        proto.__configs,
        { [nameOrConfigs]: actionConfig }
      );
    }

    // Get config
    else {
      return proto.__configs[nameOrConfigs];
    }
  }

  // Overwrite all configs
  else if (typeof nameOrConfigs === 'object') {
    proto.__configs = nameOrConfigs;
  }
}
function configure(proto, nameOrConfigs, actionConfig) {
  if (!proto.__configs) proto.__configs = {};
  if (typeof nameOrConfigs === 'string') {
    // Set new configs
    if (typeof actionConfig === 'object') {
      proto.__configs = _.assign(
        proto.__configs,
        { [nameOrConfigs]: actionConfig }
      );
    }

    // Get config
    else {
      return proto.__configs[nameOrConfigs];
    }
  }

  // Overwrite all configs
  else if (typeof nameOrConfigs === 'object') {
    proto.__configs = nameOrConfigs;
  }
}
function configure ( proto , nameOrConfigs , actionConfig ) { if ( ! proto . __configs ) proto . __configs = { } ; if ( typeof nameOrConfigs === 'string' ) { // Set new configs if ( typeof actionConfig === 'object' ) { proto . __configs = _ . assign ( proto . __configs , { [ nameOrConfigs ] : actionConfig } ) ; } // Get config else { return proto . __configs [ nameOrConfigs ] ; } } // Overwrite all configs else if ( typeof nameOrConfigs === 'object' ) { proto . __configs = nameOrConfigs ; } }
Route action for adding routes config for both Controller and its instance
Route action for adding routes config for both Controller and its instance