src/parse-mockdb.js
function registerHook(className, hookType, hookFn) {
  if (!hooks[className]) {
    hooks[className] = {};
  }

  hooks[className][hookType] = hookFn;
}
function registerHook(className, hookType, hookFn) {
  if (!hooks[className]) {
    hooks[className] = {};
  }

  hooks[className][hookType] = hookFn;
}
function registerHook ( className , hookType , hookFn ) { if ( ! hooks [ className ] ) { hooks [ className ] = { } ; } hooks [ className ] [ hookType ] = hookFn ; }
Registers a hook on a class denoted by className.

@param {string} className The name of the class to register hook on.
@param {string} hookType One of 'beforeSave', 'afterSave', 'beforeDelete', 'afterDelete'
@param {function} hookFn Function that will be called with `this` bound to hydrated model.
Must return a promise.

@note Only supports beforeSave, beforeDelete, and afterSave at the moment.
Registers a hook on a class denoted by className .