Skip to content
Myr

Module init now accepts arguments [#28]

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

authored by visionmedia · committed by visionmedia · parent 895f75f · Browse files · 2 files+16 added−4 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+16 added−4 removed

  • tests:+13 added−2 removed
  • other:+3 added−2 removed

2 files+16 added−4 removed

modified:lib/express.core.js+3 added-2 removed
133 unmodified lines
134 /**135 * Add _module_.136 *137 * @param {hash} module138 * @param {...} args139 * @api public140 */141 141 addModule : function(module) {142 addModule : function(module, args) {143 Express.settings[module.name] = {}144145 if ('init' in module) 145 module.init.call(module)146 module.init.apply(module, Express.argsArray(arguments, 1))147148 if ('settings' in module) {149 if (!module.name) throw 'module name is required when using .settings'150 for (var name in module.settings)
542 unmodified lines
modified:spec/spec.modules.js+13 added-2 removed