mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-02 20:00:05 +02:00
21 lines
231 B
Markdown
21 lines
231 B
Markdown
# TryCatch
|
|
|
|
`Try-catch` wrapper.
|
|
|
|
## Example
|
|
|
|
```js
|
|
const tryCatch = require('tryCatch');
|
|
const {parse} = JSON;
|
|
const [error, result] = tryCatch(parse, 'hello');
|
|
|
|
if (error)
|
|
console.error(error.message);
|
|
|
|
```
|
|
|
|
## License
|
|
|
|
MIT
|
|
|