yui/yui3 — pull request #1063 by ericf (2013-08-06 18:44:37+00:00)
Title: Add support for mapping route params to regexps for processing

It's desirable to both use string-based routes with named params, e.g., `"/posts/:id"`, and assign some processing to route param values, e.g., `id` should be a number.

This adds a feature to Router to support mapping named params to regular expressions. See the following example:

```javascript
var router = new Y.Router({
params: {id: /^\d+$/}
});

router.route('/posts/:id', function (req) {
// This route will only be executed when `id` is a number.
// `req.params.id` is the result object/captures array from
// `exec()`-ing the regular expression.
Y.log('Show post: ' req.params.id[0]);
});

router.save('/posts/1'); // => "Show post: 1"

// This won't log anything because `id` is not a number, the route is skipped.
router.save('/posts/asdf');
```

### Todos

- [ ] Fill out API docs
- [ ] Update user guide
- [ ] Add HISTORY.md entry