1.0.2 • Published 8 years ago

class-method-hook v1.0.2

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

ES7 Class Method Hook

Build Status

Getting Started

npm i class-method-hook

Usage

import hook from 'class-method-hook'

const logging = (field, value, context) => console.log(`${field} execute!`);

@hook(logging)
class Some {
  method1(){}
  method2(){}
}

const some = new Some();
some.method1(); // method1 execute!
some.method2(); // method1 execute!

License

MIT

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago