hooksjs
Generic Hooks and Triggers
Runs a stack of new functions before or after (pre / post) of the original function
Install
npm install hoohsjs
See live example:
See the Pen HooksJS by Joo Neto (@joaoneto) on CodePen.
Examples
Write some code
{ return success: true ; } const model = ;
Wrap it
const modelHooks = model;
Add some hooks pre / post
modelHooks ; modelHooks ;
Run it, the pre and post stack makes magic
model;