1.0.2 • Published 8 years ago

decorator-advice v1.0.2

Weekly downloads
4
License
-
Repository
github
Last release
8 years ago

ES7 aspect decorator

Build Status

Getting Started

npm i decorator-advice

Usage

import { before, after, error, around } from 'decorator-advice'

const logging = msg => console.log(msg);
class User {

  @before(() => logging('hello') )
  getUser() {
    // ... implementation ...
  }

}

If you use this in CommonJS or AMD environment:

var aspectModule = require('decorator-advice');
var aspect = aspectModule.default;
var before = aspectModule.before;

License

MIT

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago