node-pluggable
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -22,2 +22,5 @@ var EventEmitter, Pluggable, _, async, | ||
fns = 1 <= arguments.length ? slice.call(arguments, 0) : []; | ||
if (_.isUndefined(this.container)) { | ||
this.container = []; | ||
} | ||
match_param = _.first(fns); | ||
@@ -35,5 +38,2 @@ if (_.isRegExp(match_param)) { | ||
} | ||
if (_.isUndefined(this.container)) { | ||
this.container = []; | ||
} | ||
for (i = 0, len = fns.length; i < len; i++) { | ||
@@ -49,2 +49,5 @@ fn = fns[i]; | ||
match_param = arguments[0], params = 3 <= arguments.length ? slice.call(arguments, 1, i = arguments.length - 1) : (i = 1, []), callback = arguments[i++]; | ||
if (_.isUndefined(this.container)) { | ||
this.container = []; | ||
} | ||
if (!_.isFunction(callback)) { | ||
@@ -51,0 +54,0 @@ params = _.union(params, [callback]); |
{ | ||
"name": "node-pluggable", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Add your Hook more easily.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/pluggable.js", |
6368
88