Fix EsLint Brackets (error markup 'const').

This commit is contained in:
roemmelter63329 committed 2018-11-22 16:41:46 +01:00
1 parent 75add7333d
commit d20e8a9d10
6005 files changed
+337788

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
'use strict'
/**
* Tries to execute a function and discards any error that occurs.
* @param {Function} fn - Function that might or might not throw an error.
* @returns {?*} Return-value of the function when no error occurred.
*/
module.exports = function(fn) {
try { return fn() } catch (e) {}
}