flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
12
BACK_BACK/node_modules/nice-try/src/index.js
generated
vendored
Executable file
12
BACK_BACK/node_modules/nice-try/src/index.js
generated
vendored
Executable 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) {}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue