I need this for sync functions
Updated documentation for post callbacks.
Post hooks now use a 'next' callback, updated documentation to make this clear and to explain the order of flow when using post callbacks.
Fix for Issue #2
Hooks now intercept callbacks so that post handlers can be run before the callback. This is especially useful in Mongoose, where virtual async methods are not supported. The only clean way to implement them is via a post('init') handler.
…or handler. Otherwise, the fallback is now the error handler you set up in #hook or lazy #pre. After these two options, the final fallback is throwing the Error.
…e hook creation method #hook
…e target method. Instead just throw an error if you get to that point.
…he error handler, it does so with the object's scope. Throws an error if we reach that fallback check, and the hook's arity is 0.
…(err, ...) calback as its last argument -- proceeds down the middleware chain without mutating the hook arguments.
…d to 2nd argument for better readability.
…w many times it may be called within the same pre or post.