4 * Tries to execute a function and discards any error that occurs.
5 * @param {Function} fn - Function that might or might not throw an error.
6 * @returns {?*} Return-value of the function when no error occurred.
8 module.exports = function(fn) {
10 try { return fn() } catch (e) {}