refactor Hooks mixin
The existing Hooks mixin explicitly defines methods for all hooks on the Sequelize instance or a given Model. This modifies the Hooks module to provide a single method "applyTo", which mixes in the base Hook functionality (addHook, runHooks, etc), as well as autogenerates declarative hooks for the object its mixing in to (Model.beforeCreate, Sequelize.beforeDefine, etc).
Showing
with
2 additions
and
3 deletions
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment