Skip to content

Commit 7f73f56

Browse files
committed
Big Refactor
- change semistandard -> standard - refactor fixtures - rework npm scripts - lint everything - drop htmlhint
1 parent 8239375 commit 7f73f56

22 files changed

+2122
-3842
lines changed

examples/helpers.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
var global = window;
1+
const global = window
22

33
global.isFileAPIAvailable = function () {
44
// Check for the various File API support.
55
if (window.File && window.FileReader && window.FileList && window.Blob) {
66
// Great success! All the File APIs are supported.
7-
return true;
7+
return true
88
} else {
99
// source: File API availability - http://caniuse.com/#feat=fileapi
1010
// source: <output> availability - http://html5doctor.com/the-output-element/
11-
document.writeln('The HTML5 APIs used in this form are only available in the following browsers:<br />');
11+
document.writeln('The HTML5 APIs used in this form are only available in the following browsers:<br />')
1212
// 6.0 File API & 13.0 <output>
13-
document.writeln(' - Google Chrome: 13.0 or later<br />');
13+
document.writeln(' - Google Chrome: 13.0 or later<br />')
1414
// 3.6 File API & 6.0 <output>
15-
document.writeln(' - Mozilla Firefox: 6.0 or later<br />');
15+
document.writeln(' - Mozilla Firefox: 6.0 or later<br />')
1616
// 10.0 File API & 10.0 <output>
17-
document.writeln(' - Internet Explorer: Not supported (partial support expected in 10.0)<br />');
17+
document.writeln(' - Internet Explorer: Not supported (partial support expected in 10.0)<br />')
1818
// ? File API & 5.1 <output>
19-
document.writeln(' - Safari: Not supported<br />');
19+
document.writeln(' - Safari: Not supported<br />')
2020
// ? File API & 9.2 <output>
21-
document.writeln(' - Opera: Not supported');
22-
return false;
21+
document.writeln(' - Opera: Not supported')
22+
return false
2323
}
24-
};
24+
}
2525

2626
// Used to generate the data for the sine wave demo
2727
// source: http://coding.smashingmagazine.com/2011/10/04/quick-look-math-animations-javascript/
2828
global.drawSine = function () {
29-
var counter = 0;
29+
let counter = 0
3030
// 100 iterations
31-
var increase = Math.PI * 2 / 100;
32-
for (var i = 0; i <= 1; i += 0.01) {
33-
var x = i;
34-
var y = Math.sin(counter) / 2 + 0.5;
35-
counter += increase;
36-
console.log(x + ',' + y);
31+
const increase = Math.PI * 2 / 100
32+
for (let i = 0; i <= 1; i += 0.01) {
33+
const x = i
34+
const y = Math.sin(counter) / 2 + 0.5
35+
counter += increase
36+
console.log(x + ',' + y)
3737
}
38-
};
38+
}

examples/snippets/esm-usage.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import * as csv from 'jquery-csv';
2-
import * as fs from 'fs';
1+
import * as csv from 'jquery-csv'
2+
import * as fs from 'fs'
33

4-
const sample = './data/sample.csv';
4+
const sample = './data/sample.csv'
55
fs.readFile(sample, 'UTF-8', (err, fileContent) => {
6-
if (err) { console.log(err); }
6+
if (err) { console.log(err) }
77
csv.toArrays(fileContent, {}, (err, data) => {
8-
if (err) { console.log(err); }
8+
if (err) { console.log(err) }
99
for (let i = 0, len = data.length; i < len; i++) {
10-
console.log(data[i]);
10+
console.log(data[i])
1111
}
12-
});
13-
});
12+
})
13+
})

examples/snippets/node-usage.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/* eslint-disable no-unused-vars */
2-
var fs = require('fs');
3-
var csv = require('jquery-csv');
4-
var sample = './data/sample.csv';
2+
const fs = require('fs')
3+
const csv = require('jquery-csv')
4+
const sample = './data/sample.csv'
55

66
fs.readFile(sample, 'UTF-8', function (err, csv) {
7-
if (err) { console.log(err); }
7+
if (err) { console.log(err) }
88
csv.toArrays(csv, {}, function (err, data) {
9-
if (err) { console.log(err); }
10-
for (var i = 0, len = data.length; i < len; i++) {
11-
console.log(data[i]);
9+
if (err) { console.log(err) }
10+
for (let i = 0, len = data.length; i < len; i++) {
11+
console.log(data[i])
1212
}
13-
});
14-
});
13+
})
14+
})

0 commit comments

Comments
 (0)