Urara-Blog/node_modules/.pnpm-store/v3/files/24/8f0eac2be98cf8615a768e7c638b822181aaa4b70ce38dd28b9bc92e8f6a13850a35835b5112e1a6282d369e148581dbb55fde163de92e9c4694bee64664f5
2022-08-14 01:14:53 +08:00

12 lines
No EOL
303 B
Text

'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) {}
}