regex-router
Advanced tools
Comparing version 0.1.4 to 0.1.5
10
main.js
@@ -32,4 +32,12 @@ 'use strict'; /*jslint node: true, indent: 2, es5: true*/ | ||
Router.prototype.any = Router.prototype.ANY = function(url, func) { this.add(url, func); }; | ||
Router.prototype.any = Router.prototype.ANY = function(url, func) { | ||
this.add(url, func); | ||
}; | ||
Router.prototype.forward = function(url, router) { | ||
this.add(url, function(m, req, res) { | ||
// oops, discard m | ||
router.route(req, res); | ||
}); | ||
}; | ||
// add router.get(url, func), router.GET(url, func) shortcuts for common http methods | ||
@@ -36,0 +44,0 @@ // PATCH is not an official HTTP/1.1 method (http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html) |
{ | ||
"main": "./main.js", | ||
"name": "regex-router", | ||
"version": "0.1.5", | ||
"description": "Route http requests via regular expressions.", | ||
"homepage": "http://github.com/chbrown/regex-router", | ||
"keywords": [ | ||
"http", | ||
"web server", | ||
"regex", | ||
"routes", | ||
"routing" | ||
], | ||
"homepage": "https://github.com/chbrown/regex-router", | ||
"repository": { | ||
"type": "git", | ||
"url": "http://github.com/chbrown/regex-router.git" | ||
"url": "git://github.com/chbrown/regex-router.git" | ||
}, | ||
"keywords": ["http", "web server", "regex", "routes"], | ||
"version": "0.1.4", | ||
"main": "./index.js", | ||
"author": "Christopher Brown <io@henrian.com>" | ||
} |
3917
45