Permalink
Browse files

export invalidParamReturnValue so it may be overridden

  • Loading branch information...
1 parent 88bff01 commit cc5015c895c4dd94dcaf4120825db9e2bdc8ccdd @tj tj committed May 23, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/express-params.js
@@ -37,7 +37,7 @@ exports.extend.returnValue = function(app){
return function(req, res, next){
var val = req.params[name];
val = req.params[name] = fn(val);
- if (invalidParamReturnValue(val)) {
+ if (exports.invalidParamReturnValue(val)) {
next('route');
} else {
next();
@@ -59,7 +59,7 @@ exports.extend.returnValue = function(app){
* @api private
*/
-function invalidParamReturnValue(val){
+exports.invalidParamReturnValue = function(val){
return null == val
|| false === val
|| ('number' == typeof val && isNaN(val));

0 comments on commit cc5015c

Please sign in to comment.