mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
fix jshint errors for lib/connection-parameters.js
This commit is contained in:
parent
da1e62e684
commit
5e92546a30
@ -19,7 +19,7 @@ var parse = function(str) {
|
||||
var result = url.parse(str);
|
||||
var config = {};
|
||||
config.host = result.hostname;
|
||||
config.database = result.pathname ? result.pathname.slice(1) : null
|
||||
config.database = result.pathname ? result.pathname.slice(1) : null;
|
||||
var auth = (result.auth || ':').split(':');
|
||||
config.user = auth[0];
|
||||
config.password = auth[1];
|
||||
@ -31,7 +31,7 @@ var ConnectionParameters = function(config) {
|
||||
config = typeof config == 'string' ? parse(config) : (config || {});
|
||||
this.user = val('user', config);
|
||||
this.database = val('database', config);
|
||||
this.port = parseInt(val('port', config));
|
||||
this.port = parseInt(val('port', config), 10);
|
||||
this.host = val('host', config);
|
||||
this.password = val('password', config);
|
||||
this.binary = val('binary', config);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user