Skip to content

Commit 28afce2

Browse files
committed
fix jshint errors for lib/result.js
1 parent 5e92546 commit 28afce2

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/result.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,27 @@ var Result = function() {
1010

1111
var p = Result.prototype;
1212

13-
var matchRegexp = /([A-Za-z]+) (\d+ )?(\d+)?/
13+
var matchRegexp = /([A-Za-z]+) (\d+ )?(\d+)?/;
1414

1515
//adds a command complete message
1616
p.addCommandComplete = function(msg) {
17+
var match;
1718
if(msg.text) {
1819
//pure javascript
19-
var match = matchRegexp.exec(msg.text);
20+
match = matchRegexp.exec(msg.text);
2021
} else {
2122
//native bindings
22-
var match = matchRegexp.exec(msg.command);
23+
match = matchRegexp.exec(msg.command);
2324
}
2425
if(match) {
2526
this.command = match[1];
2627
//match 3 will only be existing on insert commands
2728
if(match[3]) {
2829
//msg.value is from native bindings
29-
this.rowCount = parseInt(match[3] || msg.value);
30-
this.oid = parseInt(match[2]);
30+
this.rowCount = parseInt(match[3] || msg.value, 10);
31+
this.oid = parseInt(match[2], 10);
3132
} else {
32-
this.rowCount = parseInt(match[2]);
33+
this.rowCount = parseInt(match[2], 10);
3334
}
3435
}
3536
};

0 commit comments

Comments
 (0)