Try Catch

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