function tryRequire( id ) {
	try {
		return require( id ); // eslint-disable-line stdlib/no-dynamic-require
	} catch ( error ) {
		if ( isError( error ) ) {
			return error;
		}
		// Handle case where a literal is thrown...
		if ( typeof error === 'object' ) {
			return new Error( JSON.stringify( error ) );
		}
		return new Error( error.toString() );
	}
}
Wraps `require` in a try/catch block.

@param {string} id - module id
@returns {*|Error} `module.exports` of the resolved module or an error

@example
var out = tryRequire( 'beepboop' );

if ( out instanceof Error ) {
    console.error( out.message );
}