lib/definitions/committingEventTransformer.js
function (evt, callback) {
    var self = this;
    var callbacked = false;

    function handleError (err) {
      debug(err);
      callbacked = true;
      callback(err);
    }

    try {
      if (this.transformFn.length === 2) {
        this.transformFn(_.cloneDeep(evt), function (err, newEvt) {
          if (err) return handleError(err);
          callbacked = true;
          callback(null, newEvt);
        });
      } else {
        var newEvt = this.transformFn(_.cloneDeep(evt));
        callback(null, newEvt);
      }
    } catch (err) {
      if (!callbacked) {
        return handleError(err);
      }
      throw err;
    }
  }
function (evt, callback) {
    var self = this;
    var callbacked = false;

    function handleError (err) {
      debug(err);
      callbacked = true;
      callback(err);
    }

    try {
      if (this.transformFn.length === 2) {
        this.transformFn(_.cloneDeep(evt), function (err, newEvt) {
          if (err) return handleError(err);
          callbacked = true;
          callback(null, newEvt);
        });
      } else {
        var newEvt = this.transformFn(_.cloneDeep(evt));
        callback(null, newEvt);
      }
    } catch (err) {
      if (!callbacked) {
        return handleError(err);
      }
      throw err;
    }
  }
function ( evt , callback ) { var self = this ; var callbacked = false ; function handleError ( err ) { debug ( err ) ; callbacked = true ; callback ( err ) ; } try { if ( this . transformFn . length === 2 ) { this . transformFn ( _ . cloneDeep ( evt ) , function ( err , newEvt ) { if ( err ) return handleError ( err ) ; callbacked = true ; callback ( null , newEvt ) ; } ) ; } else { var newEvt = this . transformFn ( _ . cloneDeep ( evt ) ) ; callback ( null , newEvt ) ; } } catch ( err ) { if ( ! callbacked ) { return handleError ( err ) ; } throw err ; } }
transform an CommittingEventTransformer.
@param {Object}   evt      The CommittingEventTransformer object.
@param {Function} callback The function, that will be called when this action is completed.
`function(err, evt){}`
transform an CommittingEventTransformer .