mmalecki/node — comment on commit 04645c5e7405c74f37715e58221229c36978616f
File:  line 0
By bnoordhuis:

As discussed on IRC. Yes, LGTM but preferably with the else clause collapsed to save a level of indentation. Something like this:

```javascript
exports.connect = function () {
if (typeof arguments[0] == 'object') {
options = arguments[0];
}
if (typeof arguments[1] == 'object') {
options = arguments[1];
options.port = arguments[0];
}
else if (typeof arguments[2] == 'object') {
options = arguments[2];
options.port = arguments[0];
options.host = arguments[1];
}
else {
throw new TypeError('Bad arguments');
}
cb = (typeof arguments[arguments.length - 1] == 'function') ? arguments[arguments.length - 1] : null;
}
```