function createRequire( id ) {
	var module = new Module( id );

	// Module filename:
	module.filename = id;

	// Module `node_modules` paths:
	module.paths = nodeModulePaths( dirname( id ) );

	/**
	* Attempts to load a module.
	*
	* @private
	* @param {string} path - module id
	* @returns {void}
	*/
	function require( path ) {
		try {
			return module.require( path );
		} finally {}
	}

	/**
	* Attempts to resolve a module.
	*
	* @private
	* @param {string} name - module
	* @returns {string} module filepath
	*/
	function resolve( name ) {
		return resolveFilename( name, module, false );
	}

	// Application entry point:
	require.main = main;

	// Attach method to resolve a module:
	require.resolve = resolve;

	// Support for extra extension types:
	require.extensions = extensions;

	// Use the existing module cache:
	require.cache = cache;

	return require;
}
Returns a `require` function.

@private
@param {string} id - module id (filepath)
@returns {Function} require function