index.js
function req (name, opts) {
  if (opts && opts.require) {
    return opts.require(name, opts)
  }
  var fp = require.resolve(name)
  return require(fp)
}
function req (name, opts) {
  if (opts && opts.require) {
    return opts.require(name, opts)
  }
  var fp = require.resolve(name)
  return require(fp)
}
function req ( name , opts ) { if ( opts && opts . require ) { return opts . require ( name , opts ) } var fp = require . resolve ( name ) return require ( fp ) }
Default `require` function. Pass a custom function to
`opts.require` to override.

@param  {String} `name`
@param  {Object} `opts`
@return {String}
Default require function . Pass a custom function to opts . require to override .