lib/definitions/eventExtender.js
function (fn) {
    if (!fn || !_.isFunction(fn)) {
      var err = new Error('Please pass a valid function!');
      debug(err);
      throw err;
    }


    if (fn.length === 2) {
      this.getNewIdForThisEventExtender = fn;
      return this;
    }

    this.getNewIdForThisEventExtender = function (evt, callback) {
      callback(null, fn(evt));
    };

    return this;
  }
function (fn) {
    if (!fn || !_.isFunction(fn)) {
      var err = new Error('Please pass a valid function!');
      debug(err);
      throw err;
    }


    if (fn.length === 2) {
      this.getNewIdForThisEventExtender = fn;
      return this;
    }

    this.getNewIdForThisEventExtender = function (evt, callback) {
      callback(null, fn(evt));
    };

    return this;
  }
function ( fn ) { if ( ! fn || ! _ . isFunction ( fn ) ) { var err = new Error ( 'Please pass a valid function!' ) ; debug ( err ) ; throw err ; } if ( fn . length === 2 ) { this . getNewIdForThisEventExtender = fn ; return this ; } this . getNewIdForThisEventExtender = function ( evt , callback ) { callback ( null , fn ( evt ) ) ; } ; return this ; }
Inject idGenerator for eventextender function if no id found.
@param   {Function}  fn      The function to be injected.
@returns {EventExtender} to be able to chain...
Inject idGenerator for eventextender function if no id found .