On Tue, Dec 17, 2013 at 12:57:27AM -0800, Alexander Tarmolov wrote:
> > @@ -86,14 +85,11 @@ module.exports = {
> >       * @param {String} url Server url
> >       * @return {JSONRPCClient} client
> >       */
> > -    client: function (url) {
> > -        var urlParts = url.match(URL_REGEXP),
> > -            scheme = urlParts[1] || 'http',
> > -            host = urlParts[2],
> > -            port = urlParts[4] || (scheme === 'https' ? 443 : 80),
> > -            path = urlParts[5];
> > -
> > -        return new JSONRPCClient(scheme, host, port, path);
> > +    client: function (urlstr) {
> > +
> > +		var urlobj = url.parse(urlstr);
> > +
> > +        return new JSONRPCClient(urlobj.protocol.replace(":", "") || 'http', urlobj.hostname, urlobj.port || (urlobj.protocol === 'https' ? 443 : 80), urlobj.path);
> 
> It's a very long line. Let's split it. And it's better tot use ```slice``` to chop the last char.
> ```
> var scheme = urlobj.protocol.slice(0, -1) || 'http';
> var port = urlobj.port || urlobj.protocol === 'https' ? 443 : 80;
> return new JSONRPCClient(scheme, urlobj.hostname, port, urlobj.path);
> ```
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/tarmolov/simple-jsonrpc/pull/4/files#r8395365

Ok.  Thanks.

-- 
David Dodd
Bing Technologies Pty Ltd
Suite 54, Jones Bay Wharf
26-32 Pirrama Road
Pyrmont NSW 2009 Australia
Telephone +612 9552 5500 Fax +612 9552 5549