|
|
il y a 6 jours | |
|---|---|---|
| .. | ||
| lib | il y a 6 jours | |
| ChangeLog | il y a 6 jours | |
| LICENSE | il y a 6 jours | |
| README.md | il y a 6 jours | |
| package.json | il y a 6 jours | |
Functional try-catch wrapper
npm i try-catch
const tryCatch = require('try-catch');
const {parse} = JSON;
const [error, result] = tryCatch(parse, 'hello');
if (error)
console.error(error.message);
MIT