Skip to content
Myr

Fixed hook()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 03f8d7a · Browse files · 1 file+6 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−2 removed

  • other:+6 added−2 removed

1 file+6 added−2 removed

modified:lib/express.core.js+6 added-2 removed
51 unmodified lines
52 }53 },54 55 /**56 * Invoke hook _name_ with _args_.56 * Invoke hook _name_ with _args_, returning57 * an array of return values.58 *59 * @param {string} name60 * @param {...} args61 * @return {array}62 * @api public63 */64 65 hook : function(name, args) {66 var results = []67 for (i = 0, len = this.modules.length; i < len; ++i)68 if (typeof this.modules[i][name] == 'function')66 this.modules[i][name].apply(this.modules[i], this.argsArray(arguments, 1))69 results.push(this.modules[i][name].apply(this.modules[i], this.argsArray(arguments, 1)))70 return results71 },72 73 /**74 * Add _module_.
505 unmodified lines