try-catch
functional try-catch wrapper
Last updated a year ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install try-catch 
SYNC missed versions from official npm registry.

Try Catch License NPM version Build Status Coverage Status

Functional try-catch wrapper

Install

npm i try-catch

Example

import {tryCatch} from 'try-catch';

const {parse} = JSON;
const [error, result] = tryCatch(parse, 'hello');

if (error)
    console.error(error.message);

Related

License

MIT

Current Tags

  • 4.1.1                                ...           latest (3 months ago)

17 Versions

  • 4.1.1                                ...           3 months ago
  • 4.1.0                                ...           3 months ago
  • 4.0.9                                ...           10 months ago
  • 4.0.8                                ...           10 months ago
  • 4.0.7                                ...           a year ago
  • 4.0.6                                ...           a year ago
  • 4.0.5                                ...           a year ago
  • 4.0.4                                ...           a year ago
  • 4.0.3                                ...           a year ago
  • 4.0.2                                ...           a year ago
  • 4.0.1                                ...           a year ago
  • 4.0.0                                ...           a year ago
  • 3.0.1                                ...           5 years ago
  • 3.0.0                                ...           7 years ago
  • 2.0.1                                ...           7 years ago
  • 2.0.0                                ...           9 years ago
  • 1.0.0                                ...           12 years ago

© 2010 - cnpmjs.org x YWFE | Home | YWFE