An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# tryify

[![Greenkeeper badge](https://badges.greenkeeper.io/axetroy/tryify.svg)](https://greenkeeper.io/)
[![Build Status](https://travis-ci.org/axetroy/tryify.svg?branch=master)](https://travis-ci.org/axetroy/tryify)
[![Dependency](https://david-dm.org/axetroy/tryify.svg)](https://david-dm.org/axetroy/tryify)
![License](https://img.shields.io/badge/license-MIT-green.svg)
[![Prettier](https://img.shields.io/badge/Code%20Style-Prettier-green.svg)](https://github.com/prettier/prettier)
![Node](https://img.shields.io/badge/node-%3E=6.0-blue.svg?style=flat-square)
[![npm version](https://badge.fury.io/js/tryify.svg)](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)