@playerony/try-catch-wrapper
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

try catch wrapper

Lint Test Build Prettier Typecheck Commitlint

Functional try-catch wrapper.

Installation (npm)

npm i @playerony/try-catch-wrapper
yarn add @playerony/try-catch-wrapper

Usage

import { tryCatchWrapper, asyncTryCatchWrapper } from '@playerony/try-catch-wrapper';

const onSuccess = () => console.log('success');

const asyncOnSuccess = async () => Promise.resolve(10);

const onError = () => console.log('error');

tryCatchWrapper(onSuccess, onError);

asyncTryCatchWrapper(asyncOnSuccess, onError);

/@playerony/try-catch-wrapper/

    Package Sidebar

    Install

    npm i @playerony/try-catch-wrapper

    Weekly Downloads

    5

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    40.2 kB

    Total Files

    37

    Last publish

    Collaborators

    • playerony