use directories for structure
This commit is contained in:
6
node_modules/try-catch/lib/try-catch.js
generated
vendored
6
node_modules/try-catch/lib/try-catch.js
generated
vendored
@@ -1,10 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function tryCatch(fn) {
|
||||
var args = [].slice.call(arguments, 1);
|
||||
|
||||
module.exports = (fn, ...args) => {
|
||||
try {
|
||||
return [null, fn.apply(null, args)];
|
||||
return [null, fn(...args)];
|
||||
} catch(e) {
|
||||
return [e];
|
||||
}
|
||||
|
Reference in New Issue
Block a user