@webqit/fetch-plus 0.1.28 → 0.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +1 -1
- package/dist/main.js.map +2 -2
- package/package.json +3 -3
- package/src/HeadersPlus.js +2 -2
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"homepage": "https://fetch-plus.netlify.app/",
|
|
13
13
|
"icon": "https://webqit.io/icon.svg",
|
|
14
|
-
"version": "0.1.
|
|
14
|
+
"version": "0.1.30",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@webqit/observer": "^3.8.19",
|
|
37
|
-
"@webqit/port-plus": "^0.1.
|
|
37
|
+
"@webqit/port-plus": "^0.1.22",
|
|
38
38
|
"@webqit/url-plus": "^0.1.8"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@webqit/observer": "^3.8.19",
|
|
42
|
-
"@webqit/port-plus": "^0.1.
|
|
42
|
+
"@webqit/port-plus": "^0.1.22",
|
|
43
43
|
"@webqit/url-plus": "^0.1.8",
|
|
44
44
|
"chai": "^4.3.4",
|
|
45
45
|
"chai-as-promised": "^7.1.1",
|
package/src/HeadersPlus.js
CHANGED
|
@@ -115,12 +115,12 @@ export class HeadersPlus extends Headers {
|
|
|
115
115
|
const range = rangeStr.trim().split('-').map((s) => s ? parseInt(s, 10) : null);
|
|
116
116
|
range.resolveAgainst = (totalLength) => {
|
|
117
117
|
const offsets = [...range];
|
|
118
|
-
if (offsets[1]
|
|
118
|
+
if (typeof offsets[1] !== 'number') {
|
|
119
119
|
offsets[1] = totalLength - 1;
|
|
120
120
|
} else {
|
|
121
121
|
offsets[1] = Math.min(offsets[1], totalLength) - 1;
|
|
122
122
|
}
|
|
123
|
-
if (offsets[0]
|
|
123
|
+
if (typeof offsets[0] !== 'number') {
|
|
124
124
|
offsets[0] = offsets[1] ? totalLength - offsets[1] - 1 : 0;
|
|
125
125
|
}
|
|
126
126
|
return offsets;
|