Skip to content

javarouka/class-method-hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

es7 class-method-hook

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published