- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스) - Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포 - 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
1.1 KiB
Markdown
32 lines
1.1 KiB
Markdown
# nice-try
|
|
|
|
[](https://travis-ci.org/electerious/nice-try) [](https://ci.appveyor.com/project/electerious/nice-try) [](https://coveralls.io/github/electerious/nice-try?branch=master) [](https://david-dm.org/electerious/nice-try#info=dependencies) [](https://greenkeeper.io/)
|
|
|
|
A function that tries to execute a function and discards any error that occurs.
|
|
|
|
## Install
|
|
|
|
```
|
|
npm install nice-try
|
|
```
|
|
|
|
## Usage
|
|
|
|
```js
|
|
const niceTry = require('nice-try')
|
|
|
|
niceTry(() => JSON.parse('true')) // true
|
|
niceTry(() => JSON.parse('truee')) // undefined
|
|
niceTry() // undefined
|
|
niceTry(true) // undefined
|
|
```
|
|
|
|
## API
|
|
|
|
### Parameters
|
|
|
|
- `fn` `{Function}` Function that might or might not throw an error.
|
|
|
|
### Returns
|
|
|
|
- `{?*}` Return-value of the function when no error occurred. |