stoodder/finchjs — pull request #17 by m3talsmith (2014-07-29 17:09:15+00:00)
Title: Support route chaining: return this when adding a route

When setting up routes you currently have to do separate route additions via:

``` coffee
Finch.route '/', ->
console.log 'home'
Finch.route '/about', ->
console.log 'about'
```

This might seem fine when using this in coffeescript, but for those of us that use straight javascript it becomes this:

``` js
Finch.route('/', function () {
console.log('home');
});
Finch.route('/about', function () {
console.log('about');
});
```

By returning the 'this' object you allow the pure javascript to look like this:

``` js
Finch
.route('/', function () {
console.log('home');
})
.route('/about', function () {
console.log('about');
});
```

Which we prefer.