lib/definitions/command.js
function (preLoadCond) {
    if (!preLoadCond || !_.isObject(preLoadCond)) {
      var err = new Error('Please inject a valid preCondition object!');
      debug(err);
      throw err;
    }

    if (!preLoadCond.payload) {
      preLoadCond.payload = this.aggregate.defaultPreLoadConditionPayload;
    }

    if (this.preLoadConditions.indexOf(preLoadCond) < 0) {
      preLoadCond.defineAggregate(this.aggregate);
      this.preLoadConditions.push(preLoadCond);
      this.preLoadConditions = _.sortBy(this.preLoadConditions, function(pc) {
        return pc.priority;
      });
    }
  }
function (preLoadCond) {
    if (!preLoadCond || !_.isObject(preLoadCond)) {
      var err = new Error('Please inject a valid preCondition object!');
      debug(err);
      throw err;
    }

    if (!preLoadCond.payload) {
      preLoadCond.payload = this.aggregate.defaultPreLoadConditionPayload;
    }

    if (this.preLoadConditions.indexOf(preLoadCond) < 0) {
      preLoadCond.defineAggregate(this.aggregate);
      this.preLoadConditions.push(preLoadCond);
      this.preLoadConditions = _.sortBy(this.preLoadConditions, function(pc) {
        return pc.priority;
      });
    }
  }
function ( preLoadCond ) { if ( ! preLoadCond || ! _ . isObject ( preLoadCond ) ) { var err = new Error ( 'Please inject a valid preCondition object!' ) ; debug ( err ) ; throw err ; } if ( ! preLoadCond . payload ) { preLoadCond . payload = this . aggregate . defaultPreLoadConditionPayload ; } if ( this . preLoadConditions . indexOf ( preLoadCond ) < 0 ) { preLoadCond . defineAggregate ( this . aggregate ) ; this . preLoadConditions . push ( preLoadCond ) ; this . preLoadConditions = _ . sortBy ( this . preLoadConditions , function ( pc ) { return pc . priority ; } ) ; } }
Injects the pre-load-condition function.
@param {Function} preLoadCond The pre-load-condition function that should be injected
Injects the pre - load - condition function .