Skip to content
Myr

Added hookImmutable()

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

authored by visionmedia · committed by visionmedia · parent 4f7e90a · Browse files · 2 files+86 added−0 removed
This commit

State

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

Diff stats

2 files+86 added−0 removed

  • tests:+68 added−0 removed
  • other:+18 added−0 removed

2 files+86 added−0 removed

modified:lib/express.core.js+18 added
69 unmodified lines
70 return results71 },72 73 /**74 * Invoke hook _name_ with _immutable_ and _args_, returning75 * the _immutable_ variable once modified by each hook implementation.76 * When implementing these hooks, the function must return a value.77 *78 * @param {mixed} immutable79 * @param {...} args80 * @return {mixed}81 * @api public82 */83 84 hookImmutable : function(immutable, args) {85 for (i = 0, len = this.modules.length; i < len; ++i)86 if (typeof this.modules[i][name] == 'function')87 immutable = this.modules[i][name].apply(this.modules[i], this.argsArray(arguments, 1))88 return immutable89 },90 91 /**92 * Add _module_.93 *94 * @param {hash} module95 * @api public
502 unmodified lines
added:spec/spec.modules.js+68 added