Module Hook
Apply deep before/after hooks to any methods/functions
Statistics
Social
Project Health
Install
$ npm install @brickify/m-hook
Usage
var hook = ; var ns = { return ; } { return ; }; nsbar { return next ? : arg + 1;}; // Register hook after definitionsnsbar = ; // Register hook before definitions; nsfoo { return next ? : arg + 1;}; nsfoo { return ;}; nsfoobefore { return ;}; nsfoobefore { return ;}; // Run methodns;// Output: 6 // Run methodns;// Output: 3
TODO
- Add JSDoc, comment and Code Signature
- Add beforeEach and afterEach hooks