function (name, version) {
    if (!name || !_.isString(name)) {
      var err = new Error('Please pass a valid string as name!');
      debug(err);
      throw err;
    }

    version = version || 0;

    if (!_.isNumber(version)) {
      var err = new Error('Please pass a valid number as version!');
      debug(err);
      throw err;
    }

    var found = _.find(this.loadingEventTransformers, function (evt) {
      return evt.name === name && evt.version === version;
    });

    if (found) return found;

    return _.find(this.loadingEventTransformers, function (evt) {
      return evt.name === name && (evt.version === null || evt.version === undefined);
    });
  }
function (name, version) {
    if (!name || !_.isString(name)) {
      var err = new Error('Please pass a valid string as name!');
      debug(err);
      throw err;
    }

    version = version || 0;

    if (!_.isNumber(version)) {
      var err = new Error('Please pass a valid number as version!');
      debug(err);
      throw err;
    }

    var found = _.find(this.loadingEventTransformers, function (evt) {
      return evt.name === name && evt.version === version;
    });

    if (found) return found;

    return _.find(this.loadingEventTransformers, function (evt) {
      return evt.name === name && (evt.version === null || evt.version === undefined);
    });
  }
function ( name , version ) { if ( ! name || ! _ . isString ( name ) ) { var err = new Error ( 'Please pass a valid string as name!' ) ; debug ( err ) ; throw err ; } version = version || 0 ; if ( ! _ . isNumber ( version ) ) { var err = new Error ( 'Please pass a valid number as version!' ) ; debug ( err ) ; throw err ; } var found = _ . find ( this . loadingEventTransformers , function ( evt ) { return evt . name === name && evt . version === version ; } ) ; if ( found ) return found ; return _ . find ( this . loadingEventTransformers , function ( evt ) { return evt . name === name && ( evt . version === null || evt . version === undefined ) ; } ) ; }
Returns the loadingEventTransformer module by event name and event version.
@param {String} name    The event name.
@param {Number} version The event version. [optional; default 0]
@returns {Event}
Returns the loadingEventTransformer module by event name and event version .