We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0194e37 commit d5de96bCopy full SHA for d5de96b
index.js
@@ -53,7 +53,12 @@ methods.forEach(function(method){
53
, self = this;
54
55
this.namespace(path, function(){
56
- path = this._ns.join('/').replace(/\/\//g, '/').replace(/\/$/, '') || '/';
+ if (Object.prototype.toString.call(path) == '[object RegExp]') {
57
+ path = path; // TODO: Convert RegExp
58
+ }
59
+ else {
60
+ path = this._ns.join('/').replace(/\/\//g, '/').replace(/\/$/, '') || '/';
61
62
args.forEach(function(fn){
63
orig.call(self, path, fn);
64
});
@@ -62,4 +67,4 @@ methods.forEach(function(method){
67
return this;
68
};
69
65
-});
70
+});
0 commit comments