strongloop/express — pull request #2308 by jeremylevy (2014-08-18 14:23:08+00:00)
Title: Fix req.subdomains returns when passing IP address as hostname

Currently, when passing an ip address like `127.0.0.1` as hostname, `req.subdomains` returns an array with address parts: `['0', '127']`. I tried to fix it by returning an empty array instead.

Not sure, however, whether you prefer adding an external dependency (like validator - https://github.com/chriso/validator.js) to check for IP address. (The used regex are taken from it by the way.)