lib/Controller.js
function detectConflictActions(instance) {
  // Get all props and check reserved words
  let propNames = Object.getOwnPropertyNames(instance.__proto__);

  // Check internal action conflicts
  _.each(propNames, function(name) {
    assert(
      !~RESERVED_METHODS.indexOf(name),
      `Action: \`${name}\` is reserved by baiji.Controller, please rename it`
    );
  });
}
function detectConflictActions(instance) {
  // Get all props and check reserved words
  let propNames = Object.getOwnPropertyNames(instance.__proto__);

  // Check internal action conflicts
  _.each(propNames, function(name) {
    assert(
      !~RESERVED_METHODS.indexOf(name),
      `Action: \`${name}\` is reserved by baiji.Controller, please rename it`
    );
  });
}
function detectConflictActions ( instance ) { // Get all props and check reserved words let propNames = Object . getOwnPropertyNames ( instance . __proto__ ) ; // Check internal action conflicts _ . each ( propNames , function ( name ) { assert ( ! ~ RESERVED_METHODS . indexOf ( name ) , ` \` ${ name } \` ` ) ; } ) ; }
Detect whether user defined actions unexpectedly overwritten reserved actions
Error will be throwed out if any confliction found
Detect whether user defined actions unexpectedly overwritten reserved actions Error will be throwed out if any confliction found