1 thought on “Error router.param()

  1. +1 it does only accept a function

    A simple modification could allow this (https://github.com/visionmedia/express/blob/master/lib/router/index.js#L93):

    
      if(fn instanceof RegExp) {
        fn = function() { 
          return param.match(fn); 
        }
      }
    

    Is it intended behavior? (in the docs it provides Regexp atm)

    I can’t find how this was handle in express3.x, if someone has a clue please share 🙂

    @DamienP33: take a look at https://github.com/visionmedia/express-params (not sure if it’s compatible)

Comments are closed.