Try Catch
![Coverage Status](https://camo.githubusercontent.com/049ab365357c14a93827aeedad87f6d2b5cd984baf2262cdb6d2b77f6f738624/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f636f64657261697365722f726561646966792f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)
Functional try-catch
wrapper
Install
npm i try-catch
Example
const tryCatch = require('try-catch');
const {parse} = JSON;
const [error, result] = tryCatch(parse, 'hello');
if (error)
console.error(error.message);
Related
- try-to-catch - functional try-catch wrapper for promises.
License
MIT