Skip to content

Commit 582d308

Browse files
Merge branch 'master' into gentle-mite
2 parents b087a12 + b55f6b7 commit 582d308

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

lib/helper.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ var xml2js = require('xml2js'),
1212
entities = require('entities')
1313
qs = require('querystring');
1414

15-
var parser = new xml2js.Parser({explicitArray: false, mergeAttrs: true});
15+
var parser = new xml2js.Parser({ explicitArray: false, mergeAttrs: true });
1616

1717
var reNumber = /^[\.\+\-]?[\d\.]+$/,
18-
reInvalidDec = /(?:\.\d*){2,}/,
19-
reDec = /\./,
20-
reLineBreak = /[\n\r]+/g,
21-
reLastBreak = /\n$/,
22-
reProtocol = /^https?:\/\//i,
23-
reIp = /\d+\.\d+\.\d+\.\d+/, // 127.0.0.1
18+
reInvalidDec = /(?:\.\d*){2,}/,
19+
reDec = /\./,
20+
reLineBreak = /[\n\r]+/g,
21+
reLastBreak = /\n$/,
22+
reProtocol = /^https?:\/\//i,
23+
reIp = /\d+\.\d+\.\d+\.\d+/, // 127.0.0.1
2424

25-
TAB = '\t',
26-
NEWLINE = '\n';
25+
TAB = '\t',
26+
NEWLINE = '\n';
2727

2828
function parseNumber(s) {
2929
if (typeof s !== 'string' || !reNumber.test(s) || reInvalidDec.test(s)) {
@@ -35,7 +35,7 @@ function parseNumber(s) {
3535

3636
function normalizeObj(root) {
3737
if (typeof root === 'object') {
38-
Object.keys(root).forEach(function(key) {
38+
Object.keys(root).forEach(function (key) {
3939
var value = root[key];
4040
if (typeof value === 'string') {
4141
if (value.length === 0 || value === '\n') {
@@ -63,8 +63,8 @@ function xmlToObj(xml, callback) {
6363

6464
function svToObj(delimiter, headers, sv) {
6565
var data,
66-
start = 0,
67-
obj = {};
66+
start = 0,
67+
obj = {};
6868

6969
delimiter = delimiter || ',';
7070

@@ -102,11 +102,11 @@ function svToObj(delimiter, headers, sv) {
102102
}
103103

104104
function csvParser(data, callback) {
105-
csv.parse(data.toString(), { columns: true }, function(err, data) {
105+
csv.parse(data.toString(), { columns: true }, function (err, data) {
106106
if (err) {
107107
callback.bind(this, err);
108108
}
109-
csv.transform(data, function(row) {
109+
csv.transform(data, function (row) {
110110
var key, value;
111111
for (key in row) {
112112
value = row[key].replace(/<b>|<\/b>/g, '');
@@ -235,8 +235,8 @@ function setQuery(map, options, query) {
235235
map.options.forEach(function eachOpts(opt) {
236236
Object.keys(opt).forEach(function eachOpt(key) {
237237
var param = opt[key],
238-
name = param.name,
239-
value = options[name] || options[key];
238+
name = param.name,
239+
value = options[name] || options[key];
240240

241241
if (value !== undefined && param.api) {
242242
if (param.array) {

lib/webpagetest.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ function get(config, pathname, data, proxy, agent, callback, encoding) {
172172
}
173173

174174
return request.end();
175-
176175
}
177176

178177
// execute callback properly normalizing optional args

0 commit comments

Comments
 (0)