https://github.com/axetroy/tryify
Run the JavaScript code in the try{}catch(){} block
https://github.com/axetroy/tryify
catch error try tryify
Last synced: 6 months ago
JSON representation
Run the JavaScript code in the try{}catch(){} block
- Host: GitHub
- URL: https://github.com/axetroy/tryify
- Owner: axetroy
- License: mit
- Created: 2017-06-23T08:09:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-08T12:49:41.000Z (over 6 years ago)
- Last Synced: 2024-04-23T18:34:27.536Z (over 1 year ago)
- Topics: catch, error, try, tryify
- Language: JavaScript
- Homepage:
- Size: 102 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: contributing.md
- License: LICENSE
Awesome Lists containing this project
README
# tryify
[](https://greenkeeper.io/)
[](https://travis-ci.org/axetroy/tryify)
[](https://david-dm.org/axetroy/tryify)

[](https://github.com/prettier/prettier)

[](https://badge.fury.io/js/tryify)Run the JavaScript code in the try{}catch(){} block
## Installation
```bash
npm install tryify
```## Usage
```javascript
import tryify from 'tryify';tryify(function login(name,pwd){
// ...your code run in try catch block
})
.catch(function(err){
// if error, will catch error object in this block
})
.run('axetroy','111111');
```## Contributing
```bash
git clone https://github.com/axetroy/tryify.git
cd ./tryify
yarn
```You can flow [Contribute Guide](https://github.com/axetroy/tryify/blob/master/contributing.md)
## Contributors
| [
Axetroy](http://axetroy.github.io)
[💻](https://github.com/gpmer/gpm.js/commits?author=axetroy) 🔌 [⚠️](https://github.com/gpmer/gpm.js/commits?author=axetroy) [🐛](https://github.com/gpmer/gpm.js/issues?q=author%3Aaxetroy) 🎨 |
| :---: |## License
The [MIT License](https://github.com/axetroy/tryify/blob/master/LICENSE)