Skip to content

Commit c00ca20

Browse files
authored
Merge pull request #101 from Pradhyumna02/download-calculations-jshint
Fix jshint issues
2 parents 8c610b4 + 4df16b1 commit c00ca20

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "speed-testjs",
3-
"version": "1.0.26",
3+
"version": "1.0.27",
44
"description": "measure internet bandwidth",
55
"main": "index.js",
66
"author": "Maulan Byron",

public/lib/statisticalCalculator.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
*/
4343
statisticalCalculator.prototype.getResults = function () {
4444
this.data = this.data.sort(this.numericComparator);
45-
var dataset = (this.isIqrFilter) ? this.interQuartileRange(data) : this.slicing(this.data, this.start, this.end);
45+
var dataset = (this.isIqrFilter) ? this.interQuartileRange(this.data) : this.slicing(this.data, this.start, this.end);
4646
var peakValue = dataset[dataset.length - 1];
4747
var mean = this.meanCalculator(dataset);
4848

@@ -146,9 +146,9 @@
146146
*/
147147
statisticalCalculator.prototype.slicing = function (a, start, end) {
148148
var dataLength = a.length;
149-
var start = Math.round(dataLength * start);
150-
var end = Math.round(dataLength * end);
151-
var sliceData = a.slice(start, end);
149+
var arrayStartVal = Math.round(dataLength * start);
150+
var arrayEndVal = Math.round(dataLength * end);
151+
var sliceData = a.slice(arrayStartVal, arrayEndVal);
152152
return sliceData;
153153
};
154154

0 commit comments

Comments
 (0)