senchalabs/connect — pull request #981 by kentcdodds (2013-12-27 15:10:38+00:00)
Title: Adding destroy convenience method

Adding this takes my code from this:

```javascript
if (req.session.destroy) {
req.session.destroy();
} else {
delete req.session;
}
```

to

```javascript
req.session.destroy();
```

Wins:

1. Readability
2. Making the learning curve less steep
3. Less lines

There is a use case when I may want to use a cookieSession in one environment, but a sessionStore in another. With a [sessionStore](http://www.senchalabs.org/connect/session.html), it must implement the `destroy` method. Not having the destroy method on the cookieSession makes it so I can trust that the session will always have a `destroy` method regardless of the type of session I'm using.

I can't think of a reason this shouldn't be accepted. Thanks!