Skip to content

Commit 21a61ec

Browse files
added eslint, updated Readme.md
1 parent 6697a0e commit 21a61ec

11 files changed

+845
-69
lines changed

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/dist/**
2+
/test/**
3+
/**/*.md

.eslintrc.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es6": true,
5+
"node": true
6+
},
7+
"extends": "eslint:recommended",
8+
"globals": {
9+
"Atomics": "readonly",
10+
"SharedArrayBuffer": "readonly"
11+
},
12+
"parserOptions": {
13+
"ecmaVersion": 2018,
14+
"sourceType": "module"
15+
},
16+
"rules": {
17+
"no-empty": [
18+
1,
19+
{
20+
"allowEmptyCatch": true
21+
}
22+
]
23+
}
24+
}

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![](https://badgen.net/npm/license/safe-jsonp)](https://unpkg.com/[email protected]/dist/safe-jsonp.umd.js)
66

77

8-
A sandboxed JSONP implementation for the browser.
8+
A sandboxed JSONP implementation for browsers.
99

1010
# Why
1111

@@ -95,7 +95,7 @@ const data= await JSONP('http://api.github.com/users/DigitalBrainJS?name=bla&age
9595
},
9696

9797
timeout: 60000, //60 seconds
98-
preventCache: true,
98+
preventCache: true,//add _rnd query param with random value
9999
cbParam: 'callback',
100100
Promise //custom Promise class
101101
})
@@ -123,6 +123,7 @@ jsonp.abort();
123123
Or when using Promise:
124124
```javascript
125125
const sharedOptions= {abortable: true};
126+
//new method "abort" will be attached to this object
126127

127128
JSONP('http://api.github.com/users/DigitalBrainJS', sharedOptions)
128129
.then(data=>console.log(data), err=>console.warn(err));

gulpfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ gulp.task("jsonp-server", function () {
124124
});
125125

126126

127-
gulp.task("dev", function (done) {
127+
gulp.task("dev", function () {
128128
isDevMode= true;
129129

130130
runSequence(["build:dev", "webserver"], clientBuildTests, "jsonp-server", function () {

0 commit comments

Comments
 (0)