@aaronburt/try
v1.1.1
Published
tryCatch()
Downloads
8
Readme
TryCatch
tryCatch()
function exampleFunction(st){
return st;
}
const result = tryCatch(exampleFunction, 'this is a string');
result // '[null, 'this is a string']'
if(result[0] === null){
console.log(result[1]) // 'this is a string'
}