Skip to content

javarouka/decorator-advice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published