raganwald.github.com/node_modules/try-catch at master · raganwald/raganwald.github.com · GitHub
Skip to content

Latest commit

 

History

History

Folders and files

README.md

Try Catch License NPM version Dependency Status Build Status Coverage Status

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

License

MIT