mcavage/node-restify — pull request #624 by TheThing (2014-06-11 15:07:00+00:00)
Title: Expose the Request and Response

With these changes, one can check if the request object or response object are instanceof.

Assuming I have a (stupid) helper function like so:

```javascript
var restify = require('restify');

exports.isLocalhost = function(ip, cb, req) {
if (ip === '127.0.0.1') {
if (req instanceof restify.Request) {
req.log.warn('Request was made localhost');
}
return true;
}
return false;
}
```

One could unit test the isLocalhost helper without worrying about faking the request object.