the-decorators

Decorators for the-framework

the-decorators

Decorators for the-framework

Installation

$ npm install the-decorators --save

Usage

'use strict'

const {rescue} = require('the-decorators')

async function tryExample () {

  class MyClass {

    @rescue((e, instance) => console.error(e))
    async doSomethingMightThrow () {
      /* ... */
    }

  }

}

tryExample().catch((err) => console.error(err))

API Guide

License

This software is released under the MIT License.

Links

HomePage

https://github.com/the-labo/the-decorators#readme

Repository

the-labo/the-decorators