src/require.js
function _runEval(config, parser, options, sync=true) {
  const time = process.hrtime();
  const evalEvent = new emitter.Evaluate({
    target:config.filename,
    source:(config.parent || {}).filename,
    moduleConfig: config,
    parserOptions: options,
    sync
  });

  const evaluateEvent = emitter.emit('evaluate', evalEvent);

  function evaluated() {
    let module = ((evalEvent.data.module) ? evalEvent.data.module : parser.bind(settings)(config, options));
    if (!module || !module.loaded) return module;
    const evaluatedEvent =  emitter.emit('evaluated', new emitter.Evaluated({
      target:module.filename,
      source:(module.parent || {}).filename,
      duration:process.hrtime(time),
      cacheSize: cache.size,
      exports: module.exports,
      sync
    }));
    try {filePaths.set(module.exports, module.filename);} catch(err) {}

    return sync?module:evaluatedEvent.then(()=>module);
  }

  return sync?evaluated():evaluateEvent.then(evaluated);
}
function _runEval(config, parser, options, sync=true) {
  const time = process.hrtime();
  const evalEvent = new emitter.Evaluate({
    target:config.filename,
    source:(config.parent || {}).filename,
    moduleConfig: config,
    parserOptions: options,
    sync
  });

  const evaluateEvent = emitter.emit('evaluate', evalEvent);

  function evaluated() {
    let module = ((evalEvent.data.module) ? evalEvent.data.module : parser.bind(settings)(config, options));
    if (!module || !module.loaded) return module;
    const evaluatedEvent =  emitter.emit('evaluated', new emitter.Evaluated({
      target:module.filename,
      source:(module.parent || {}).filename,
      duration:process.hrtime(time),
      cacheSize: cache.size,
      exports: module.exports,
      sync
    }));
    try {filePaths.set(module.exports, module.filename);} catch(err) {}

    return sync?module:evaluatedEvent.then(()=>module);
  }

  return sync?evaluated():evaluateEvent.then(evaluated);
}
function _runEval ( config , parser , options , sync = true ) { const time = process . hrtime ( ) ; const evalEvent = new emitter . Evaluate ( { target : config . filename , source : ( config . parent || { } ) . filename , moduleConfig : config , parserOptions : options , sync } ) ; const evaluateEvent = emitter . emit ( 'evaluate' , evalEvent ) ; function evaluated ( ) { let module = ( ( evalEvent . data . module ) ? evalEvent . data . module : parser . bind ( settings ) ( config , options ) ) ; if ( ! module || ! module . loaded ) return module ; const evaluatedEvent = emitter . emit ( 'evaluated' , new emitter . Evaluated ( { target : module . filename , source : ( module . parent || { } ) . filename , duration : process . hrtime ( time ) , cacheSize : cache . size , exports : module . exports , sync } ) ) ; try { filePaths . set ( module . exports , module . filename ) ; } catch ( err ) { } return sync ? module : evaluatedEvent . then ( ( ) => module ) ; } return sync ? evaluated ( ) : evaluateEvent . then ( evaluated ) ; }
Run the parser with the given configuration and deal with events, returning the module.

@private
@param {Object} config
@param {Function} parser
@returns {Module}
Run the parser with the given configuration and deal with events returning the module .