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
34 additions
and
96 deletions
-
Please register or sign in to post a comment