try-catch
functional try-catch wrapper
Last updated 3 months ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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.0.9                                ...           latest (2 months ago)

15 Versions

  • 4.0.9                                ...           2 months ago
  • 4.0.8                                ...           2 months ago
  • 4.0.7                                ...           3 months ago
  • 4.0.6                                ...           3 months ago
  • 4.0.5                                ...           3 months ago
  • 4.0.4                                ...           3 months ago
  • 4.0.3                                ...           3 months ago
  • 4.0.2                                ...           3 months ago
  • 4.0.1                                ...           3 months ago
  • 4.0.0                                ...           3 months ago
  • 3.0.1                                ...           4 years ago
  • 3.0.0                                ...           6 years ago
  • 2.0.1                                ...           7 years ago
  • 2.0.0                                ...           8 years ago
  • 1.0.0                                ...           11 years ago

Copyright 2013 - present © cnpmjs.org | Home |