|
|
5 日 前 | |
|---|---|---|
| .. | ||
| lib | 5 日 前 | |
| ChangeLog | 5 日 前 | |
| LICENSE | 5 日 前 | |
| README.md | 5 日 前 | |
| package.json | 5 日 前 | |
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